From: bep Date: Wed, 18 Mar 2015 19:18:18 +0000 (+0100) Subject: transform: remove some superfluous int conversions X-Git-Tag: v0.14~177 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b15d0a16;p=brevno-suite%2Fhugo transform: remove some superfluous int conversions --- diff --git a/transform/absurlreplacer.go b/transform/absurlreplacer.go index 1f3f77d9..13a34c73 100644 --- a/transform/absurlreplacer.go +++ b/transform/absurlreplacer.go @@ -122,7 +122,7 @@ func checkCandidate(l *contentlexer) { if bytes.HasPrefix(l.content[l.pos:], m.match) { // check for schemaless URLs posAfter := l.pos + len(m.match) - if int(posAfter) >= len(l.content) { + if posAfter >= len(l.content) { return } r, _ := utf8.DecodeRune(l.content[posAfter:]) @@ -147,7 +147,7 @@ func (l *contentlexer) replace() { var r rune for { - if int(l.pos) >= contentLength { + if l.pos >= contentLength { l.width = 0 break }