Slight simplification and fix gcc2 build.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36150 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent 2010-04-11 13:42:45 +00:00
parent 5e818c534c
commit a9fb9013e4

View File

@ -254,8 +254,8 @@ status_t
ValueNode<float>::GetString(BString &predicate) ValueNode<float>::GetString(BString &predicate)
{ {
char buffer[32]; char buffer[32];
int32 value = fValue; int32 value = (int32)fValue;
sprintf(buffer, "0x%08lx", *(int32*)&value); sprintf(buffer, "0x%08lx", value);
predicate.SetTo(buffer); predicate.SetTo(buffer);
return B_OK; return B_OK;
} }
@ -266,8 +266,8 @@ status_t
ValueNode<double>::GetString(BString &predicate) ValueNode<double>::GetString(BString &predicate)
{ {
char buffer[32]; char buffer[32];
int64 value = fValue; int64 value = (int64)fValue;
sprintf(buffer, "0x%016Lx", *(int64*)&value); sprintf(buffer, "0x%016Lx", value);
predicate.SetTo(buffer); predicate.SetTo(buffer);
return B_OK; return B_OK;
} }