diff options
author | Kurt Jung <kurt.w.jung@gmail.com> | 2015-10-11 21:06:01 -0400 |
---|---|---|
committer | Kurt Jung <kurt.w.jung@gmail.com> | 2015-10-11 21:06:01 -0400 |
commit | d51e132c6432f2c1bbff5d9516f77375bb5252e6 (patch) | |
tree | db0dff5f018b3ddc6fb122f09940fcd4a23a52f6 /fpdf.go | |
parent | 13a5fda5f79f2c15eea512e6ec3de2ce60aa29ca (diff) |
Conditionally order another map iteration. Fix 'go vet' problem with unkeyed field in composite literal.
Diffstat (limited to 'fpdf.go')
-rw-r--r-- | fpdf.go | 15 |
1 files changed, 2 insertions, 13 deletions
@@ -3367,21 +3367,10 @@ func (f *Fpdf) putxobjectdict() { } } { - var key int64 var keyList []int64 + var key int64 var tpl Template - for key = range f.templates { - keyList = append(keyList, key) - } - if f.catalogSort { - gensort(len(keyList), - func(a, b int) bool { - return keyList[a] < keyList[b] - }, - func(a, b int) { - keyList[a], keyList[b] = keyList[b], keyList[a] - }) - } + keyList = templateKeyList(f.templates, f.catalogSort) for _, key = range keyList { tpl = f.templates[key] // for _, tpl := range f.templates { |