mirror of
https://github.com/glest/glest-source.git
synced 2025-08-13 11:54:00 +02:00
- attempt to rollback change that causes game differences on different platforms
This commit is contained in:
@@ -133,27 +133,27 @@ string boolToStr(bool b) {
|
||||
}
|
||||
}
|
||||
|
||||
string intToStr(const int64 &value) {
|
||||
string intToStr(const int64 value) {
|
||||
char str[strSize]="";
|
||||
static int MAX_INT_VALUE = std::numeric_limits<int>::max();
|
||||
if(value <= MAX_INT_VALUE) {
|
||||
snprintf(str, strSize-1, "%d", (int)value);
|
||||
}
|
||||
else {
|
||||
// static int MAX_INT_VALUE = std::numeric_limits<int>::max();
|
||||
// if(value <= MAX_INT_VALUE) {
|
||||
// snprintf(str, strSize-1, "%d", (int)value);
|
||||
// }
|
||||
// else {
|
||||
snprintf(str, strSize-1, "%lld", (long long int)value);
|
||||
}
|
||||
// }
|
||||
return (str[0] != '\0' ? str : "");
|
||||
}
|
||||
|
||||
string uIntToStr(const uint64 &value) {
|
||||
string uIntToStr(const uint64 value) {
|
||||
char str[strSize]="";
|
||||
static unsigned int MAX_UNSIGNED_INT_VALUE = std::numeric_limits<unsigned int>::max();
|
||||
if(value <= MAX_UNSIGNED_INT_VALUE) {
|
||||
snprintf(str, strSize-1, "%u", (int)value);
|
||||
}
|
||||
else {
|
||||
// static unsigned int MAX_UNSIGNED_INT_VALUE = std::numeric_limits<unsigned int>::max();
|
||||
// if(value <= MAX_UNSIGNED_INT_VALUE) {
|
||||
// snprintf(str, strSize-1, "%u", (int)value);
|
||||
// }
|
||||
// else {
|
||||
snprintf(str, strSize-1, "%llu", (long long unsigned int)value);
|
||||
}
|
||||
// }
|
||||
return (str[0] != '\0' ? str : "");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user