Showing the changes to src/core/util_string.cpp (1 of 24 files). Show all
Unified · Split
| @@ -53,7 +53,11 @@ using namespace std; · 52 unmodified lines | ||
| 53 | 53 | string itoa( t_CKINT val ) |
| 54 | 54 | { |
| 55 | 55 | char buffer[128]; |
| 56 | − sprintf( buffer, "%li", val ); | |
| 56 | +#ifdef _WIN64 | |
| 57 | + sprintf( buffer, "%lld", val ); | |
| 58 | +#else | |
| 59 | + sprintf( buffer, "%ld", val ); | |
| 60 | +#endif | |
| 57 | 61 | return string(buffer); |
| 58 | 62 | } |
| 59 | 63 | |
| @@ -68,7 +72,7 @@ string ftoa( t_CKFLOAT val, t_CKUINT precision ) · 8 unmodified lines | ||
| 68 | 72 | char str[32]; |
| 69 | 73 | char buffer[128]; |
| 70 | 74 | if( precision > 32 ) precision = 32; |
| 71 | − sprintf( str, "%%.%lif", precision ); | |
| 75 | + sprintf( str, "%%.%lif", (long)precision ); | |
| 72 | 76 | sprintf( buffer, str, val ); |
| 73 | 77 | return string(buffer); |
| 74 | 78 | } |
| @@ -469,7 +473,7 @@ std::string extract_filepath_dir(std::string &filepath) · 394 unmodified lines | ||
| 469 | 473 | //#endif |
| 470 | 474 | |
| 471 | 475 | // if the last character is a slash, skip it |
| 472 | − int i = filepath.rfind(path_separator); | |
| 476 | + t_CKINT i = filepath.rfind(path_separator); | |
| 473 | 477 | |
| 474 | 478 | if(i == std::string::npos) |
| 475 | 479 | return std::string(); |
| @@ -556,7 +560,7 @@ std::string normalize_directory_separator(const std::string &filepath) · 80 unmodified lines | ||
| 556 | 560 | { |
| 557 | 561 | #ifdef __PLATFORM_WIN32__ |
| 558 | 562 | std::string new_filepath = filepath; |
| 559 | − int len = new_filepath.size(); | |
| 563 | + t_CKINT len = new_filepath.size(); | |
| 560 | 564 | for(int i = 0; i < len; i++) |
| 561 | 565 | { |
| 562 | 566 | if(new_filepath[i] == '\\') new_filepath[i] = '/'; |