Chromium Code Reviews| Index: runtime/platform/utils.h |
| =================================================================== |
| --- runtime/platform/utils.h (revision 35714) |
| +++ runtime/platform/utils.h (working copy) |
| @@ -179,6 +179,12 @@ |
| static uint16_t HostToLittleEndian16(uint16_t host_value); |
| static uint32_t HostToLittleEndian32(uint32_t host_value); |
| static uint64_t HostToLittleEndian64(uint64_t host_value); |
| + |
| + static bool DoublesBitEqual(const double a, const double b) { |
| + const int64_t* a_i = reinterpret_cast<const int64_t*>(&a); |
|
zra
2014/05/02 23:19:08
bit_cast<int64_t, double>(a) is what we've been us
srdjan
2014/05/02 23:33:47
Done.
|
| + const int64_t* b_i = reinterpret_cast<const int64_t*>(&b); |
| + return (*a_i == *b_i); |
| + } |
| }; |
| } // namespace dart |