From 0146185c044695757c39fdd72d71178583ef20ac Mon Sep 17 00:00:00 2001 From: ws233 Date: Sun, 26 Jul 2015 11:37:15 +0300 Subject: [PATCH] Type mismatch on a 64bit platforms has been fixed. --- ccutil/genericvector.h | 2 +- ccutil/helpers.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ccutil/genericvector.h b/ccutil/genericvector.h index 8433966bf9..d089eef648 100644 --- a/ccutil/genericvector.h +++ b/ccutil/genericvector.h @@ -361,7 +361,7 @@ inline bool LoadDataFromFile(const STRING& filename, size_t size = ftell(fp); fseek(fp, 0, SEEK_SET); // Pad with a 0, just in case we treat the result as a string. - data->init_to_size(size + 1, 0); + data->init_to_size((int)size + 1, 0); bool result = fread(&(*data)[0], 1, size, fp) == size; fclose(fp); return result; diff --git a/ccutil/helpers.h b/ccutil/helpers.h index 480929c955..54ed1ed7fa 100644 --- a/ccutil/helpers.h +++ b/ccutil/helpers.h @@ -73,7 +73,7 @@ class TRand { // Remove newline (if any) at the end of the string. inline void chomp_string(char *str) { - int last_index = strlen(str) - 1; + int last_index = (int)strlen(str) - 1; while (last_index >= 0 && (str[last_index] == '\n' || str[last_index] == '\r')) { str[last_index--] = '\0';