diff options
Diffstat (limited to 'cpp/src/slice2objc/Gen.cpp')
-rw-r--r-- | cpp/src/slice2objc/Gen.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/cpp/src/slice2objc/Gen.cpp b/cpp/src/slice2objc/Gen.cpp index 6e34a182f54..c2ff2e2bca9 100644 --- a/cpp/src/slice2objc/Gen.cpp +++ b/cpp/src/slice2objc/Gen.cpp @@ -2075,18 +2075,10 @@ Slice::Gen::TypesVisitor::writeMemberHashCode(const DataMemberList& dataMembers, break; } case Builtin::KindFloat: - { - _M << sb; - _M << nl << "uint32_t bits_ = *(uint32_t*)&" << name << ";"; - _M << nl << "h_ = ((h_ << 5) + h_) ^ (uint)bits_;"; - _M << eb; - break; - } case Builtin::KindDouble: { _M << sb; - _M << nl << "uint64_t bits_ = *(uint64_t*)&" << name << ";"; - _M << nl << "h_ = ((h_ << 5) + h_) ^ (uint)(bits_ ^ (bits_ >> 32));"; + _M << nl << "h_ = ((h_ << 5) + h_) ^ [@(" << name << ") hash];"; _M << eb; break; } |