mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Changed: Use _LP64 macro instead of sizeof(long unsigned int) == 8
--HG-- branch : develop
This commit is contained in:
parent
ffe0571a12
commit
4061826715
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 ...
|
// 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)
|
inline std::string toString(const long unsigned int &val)
|
||||||
{
|
{
|
||||||
if (sizeof(long unsigned int) == 8)
|
#ifdef _LP64
|
||||||
return toString((uint64)val);
|
return toString((uint64)val);
|
||||||
|
#else
|
||||||
return toString((uint32)val);
|
return toString((uint32)val);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
# 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); }
|
inline std::string toString(const size_t &val) { return toString("%u", val); }
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
inline std::string toString(const float &val) { return toString("%f", val); }
|
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 double &val) { return toString("%lf", val); }
|
||||||
inline std::string toString(const bool &val) { return toString("%u", val?1:0); }
|
inline std::string toString(const bool &val) { return toString("%u", val?1:0); }
|
||||||
|
|
Loading…
Reference in a new issue