remove zero value checker for complex

This commit is contained in:
IncSW 2021-04-12 10:23:57 +03:00
parent b57146602e
commit ac14c18dbb
No known key found for this signature in database
GPG Key ID: 89876FA64BFB2D57
1 changed files with 0 additions and 3 deletions

View File

@ -568,9 +568,6 @@ func IsNilForMarshaler(v interface{}) bool {
return rv.Uint() == 0 return rv.Uint() == 0
case reflect.Float32, reflect.Float64: case reflect.Float32, reflect.Float64:
return math.Float64bits(rv.Float()) == 0 return math.Float64bits(rv.Float()) == 0
case reflect.Complex64, reflect.Complex128:
c := rv.Complex()
return math.Float64bits(real(c)) == 0 && math.Float64bits(imag(c)) == 0
case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Func: case reflect.Interface, reflect.Map, reflect.Ptr, reflect.Func:
return rv.IsNil() return rv.IsNil()
case reflect.Slice: case reflect.Slice: