unicode/utf16: remove unnecessary type conversions

LGTM=iant
R=golang-codereviews, iant
CC=golang-codereviews
https://golang.org/cl/79080044
This commit is contained in:
Rui Ueyama 2014-03-23 15:07:26 -07:00 committed by Ian Lance Taylor
parent fa445849d1
commit 160649ff9a
1 changed files with 1 additions and 1 deletions

View File

@ -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
}