Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1297)

Unified Diff: src/pkg/gob/encode.go

Issue 3991043: code review 3991043: delete float, complex - code changes (Closed)
Patch Set: code review 3991043: delete float, complex - code changes Created 14 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/gob/decode.go ('k') | src/pkg/gob/encoder_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/gob/encode.go
===================================================================
--- a/src/pkg/gob/encode.go
+++ b/src/pkg/gob/encode.go
@@ -223,15 +223,6 @@
return v
}
-func encFloat(i *encInstr, state *encoderState, p unsafe.Pointer) {
- f := *(*float)(p)
- if f != 0 || state.sendZero {
- v := floatBits(float64(f))
- state.update(i)
- state.encodeUint(v)
- }
-}
-
func encFloat32(i *encInstr, state *encoderState, p unsafe.Pointer) {
f := *(*float32)(p)
if f != 0 || state.sendZero {
@@ -251,17 +242,6 @@
}
// Complex numbers are just a pair of floating-point numbers, real part first.
-func encComplex(i *encInstr, state *encoderState, p unsafe.Pointer) {
- c := *(*complex)(p)
- if c != 0+0i || state.sendZero {
- rpart := floatBits(float64(real(c)))
- ipart := floatBits(float64(imag(c)))
- state.update(i)
- state.encodeUint(rpart)
- state.encodeUint(ipart)
- }
-}
-
func encComplex64(i *encInstr, state *encoderState, p unsafe.Pointer) {
c := *(*complex64)(p)
if c != 0+0i || state.sendZero {
@@ -446,10 +426,8 @@
reflect.Uint32: encUint32,
reflect.Uint64: encUint64,
reflect.Uintptr: encUintptr,
- reflect.Float: encFloat,
reflect.Float32: encFloat32,
reflect.Float64: encFloat64,
- reflect.Complex: encComplex,
reflect.Complex64: encComplex64,
reflect.Complex128: encComplex128,
reflect.String: encString,
« no previous file with comments | « src/pkg/gob/decode.go ('k') | src/pkg/gob/encoder_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b