aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/gob/encode.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding/gob/encode.go')
-rw-r--r--src/encoding/gob/encode.go8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/encoding/gob/encode.go b/src/encoding/gob/encode.go
index d67153da90..edf204f47d 100644
--- a/src/encoding/gob/encode.go
+++ b/src/encoding/gob/encode.go
@@ -209,13 +209,7 @@ func encUint(i *encInstr, state *encoderState, v reflect.Value) {
// swizzling.
func floatBits(f float64) uint64 {
u := math.Float64bits(f)
- var v uint64
- for i := 0; i < 8; i++ {
- v <<= 8
- v |= u & 0xFF
- u >>= 8
- }
- return v
+ return bits.ReverseBytes64(u)
}
// encFloat encodes the floating point value (float32 float64) referenced by v.