From: Rui Ueyama Date: Sun, 23 Mar 2014 22:07:26 +0000 (-0700) Subject: unicode/utf16: remove unnecessary type conversions X-Git-Tag: go1.3beta1~301 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=160649ff9adaffddf91c45da2767f3fdc99f6d73;p=gostls13.git unicode/utf16: remove unnecessary type conversions LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://golang.org/cl/79080044 --- diff --git a/src/pkg/unicode/utf16/utf16.go b/src/pkg/unicode/utf16/utf16.go index 903e4012aa..c0e47c535a 100644 --- a/src/pkg/unicode/utf16/utf16.go +++ b/src/pkg/unicode/utf16/utf16.go @@ -36,7 +36,7 @@ func IsSurrogate(r rune) bool { // the Unicode replacement code point U+FFFD. func DecodeRune(r1, r2 rune) rune { if surr1 <= r1 && r1 < surr2 && surr2 <= r2 && r2 < surr3 { - return (rune(r1)-surr1)<<10 | (rune(r2) - surr2) + 0x10000 + return (r1-surr1)<<10 | (r2 - surr2) + 0x10000 } return replacementChar }