Changed: Use _LP64 macro instead of sizeof(long unsigned int) == 8
This commit is contained in:
parent
cdca1e324e
commit
6544d736b9
1 changed files with 5 additions and 2 deletions
|
@ -195,9 +195,11 @@ inline std::string toString(const sint64 &val) { return toString("%"NL_I64"d", v
|
|||
// error fix for size_t? gcc 4.1.2 requested this type instead of size_t ...
|
||||
inline std::string toString(const long unsigned int &val)
|
||||
{
|
||||
if (sizeof(long unsigned int) == 8)
|
||||
#ifdef _LP64
|
||||
return toString((uint64)val);
|
||||
#else
|
||||
return toString((uint32)val);
|
||||
#endif
|
||||
}
|
||||
|
||||
# endif
|
||||
|
@ -210,6 +212,7 @@ inline std::string toString(const size_t &val) { return toString("%"NL_I64"u", v
|
|||
inline std::string toString(const size_t &val) { return toString("%u", val); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
inline std::string toString(const float &val) { return toString("%f", val); }
|
||||
inline std::string toString(const double &val) { return toString("%lf", val); }
|
||||
inline std::string toString(const bool &val) { return toString("%u", val?1:0); }
|
||||
|
|
Loading…
Reference in a new issue