mirror of
https://github.com/corda/corda.git
synced 2025-06-18 23:28:21 +00:00
fixes i2f i2d implementation. Fixes image drawing bugs on Mac OS X.
Also fixes a crash caused by implementing StringBuffer.toString(float)
This commit is contained in:
@ -207,14 +207,14 @@ hash(const uint16_t* s, unsigned length)
|
||||
inline uint32_t
|
||||
floatToBits(float f)
|
||||
{
|
||||
int32_t bits; memcpy(&bits, &f, 4);
|
||||
uint32_t bits; memcpy(&bits, &f, 4);
|
||||
return bits;
|
||||
}
|
||||
|
||||
inline uint64_t
|
||||
doubleToBits(double d)
|
||||
{
|
||||
int64_t bits; memcpy(&bits, &d, 8);
|
||||
uint64_t bits; memcpy(&bits, &d, 8);
|
||||
return bits;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user