summaryrefslogtreecommitdiff
path: root/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl
diff options
context:
space:
mode:
authorLibravatar Daenney <daenney@users.noreply.github.com>2023-02-25 13:12:40 +0100
committerLibravatar GitHub <noreply@github.com>2023-02-25 12:12:40 +0000
commitecdc8379fa8f9d88faca626e7de748c2afbe4910 (patch)
tree8c20a5826db2136fc89bee45e15355c5899fa65b /vendor/github.com/ugorji/go/codec/fast-path.go.tmpl
parent[bugfix] Fix deleted status causing issues when getting bookmark (#1551) (diff)
downloadgotosocial-ecdc8379fa8f9d88faca626e7de748c2afbe4910.tar.xz
[chore] Update gin to v1.9.0 (#1553)
Diffstat (limited to 'vendor/github.com/ugorji/go/codec/fast-path.go.tmpl')
-rw-r--r--vendor/github.com/ugorji/go/codec/fast-path.go.tmpl6
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl b/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl
index 56801ee5c..1a1cb95c6 100644
--- a/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl
+++ b/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl
@@ -409,7 +409,7 @@ func (fastpathT) {{ .MethodNamePfx "Dec" false }}Y(v []{{ .Elem }}, d *Decoder)
}
}
var j int
- for j = 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ {
+ for j = 0; d.containerNext(j, containerLenS, hasLen); j++ {
if j == 0 && len(v) == 0 { // means hasLen == false
xlen = decInferLen(containerLenS, d.h.MaxInitLen, {{ .Size }}) {{/* xlen = decDefSliceCap */}}
v = make([]{{ .Elem }}, uint(xlen))
@@ -455,7 +455,7 @@ func (fastpathT) {{ .MethodNamePfx "Dec" false }}N(v []{{ .Elem }}, d *Decoder)
return
}
hasLen := containerLenS > 0
- for j := 0; (hasLen && j < containerLenS) || !(hasLen || d.checkBreak()); j++ {
+ for j := 0; d.containerNext(j, containerLenS, hasLen); j++ {
{{/* // if indefinite, etc, then expand the slice if necessary */ -}}
if j >= len(v) {
slh.arrayCannotExpand(hasLen, len(v), j, containerLenS)
@@ -531,7 +531,7 @@ func (fastpathT) {{ .MethodNamePfx "Dec" false }}L(v map[{{ .MapKey }}]{{ .Elem
var mk {{ .MapKey }}
var mv {{ .Elem }}
hasLen := containerLen > 0
- for j := 0; (hasLen && j < containerLen) || !(hasLen || d.checkBreak()); j++ {
+ for j := 0; d.containerNext(j, containerLen, hasLen); j++ {
d.mapElemKey()
{{ if eq .MapKey "interface{}" }}mk = nil
d.decode(&mk)