diff options
author | Vitaly Novichkov <admin@wohlnet.ru> | 2018-06-21 05:47:20 +0300 |
---|---|---|
committer | Vitaly Novichkov <admin@wohlnet.ru> | 2018-06-21 05:47:20 +0300 |
commit | 6b0ca0b306b23a313491742f0c78debb49a037e9 (patch) | |
tree | 200a3850cc9d3de161da22fbe1c82faef26d3551 /src/file_reader.hpp | |
parent | 86038a9ccafd7e848e67535f7995d86601cb1e0f (diff) | |
download | libADLMIDI-6b0ca0b306b23a313491742f0c78debb49a037e9.tar.gz libADLMIDI-6b0ca0b306b23a313491742f0c78debb49a037e9.tar.bz2 libADLMIDI-6b0ca0b306b23a313491742f0c78debb49a037e9.zip |
Attempt to fix build on Windows
Diffstat (limited to 'src/file_reader.hpp')
-rw-r--r-- | src/file_reader.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/file_reader.hpp b/src/file_reader.hpp index 0f630df..f601cee 100644 --- a/src/file_reader.hpp +++ b/src/file_reader.hpp @@ -26,9 +26,10 @@ #ifndef FILE_AND_MEM_READER_HHHH #define FILE_AND_MEM_READER_HHHH -#include <string> -#include <cstdio> +#include <string> // std::string +#include <cstdio> // std::fopen, std::fread, std::fseek, std::ftell, std::fclose, std::feof #ifdef _WIN32 +#include <cstring> // std::strlen #include <windows.h> // MultiByteToWideChar #endif @@ -93,7 +94,7 @@ public: m_fp = std::fopen(path, "rb"); #else wchar_t widePath[MAX_PATH]; - int size = MultiByteToWideChar(CP_UTF8, 0, path, (int)std::strlen(path), widePath, MAX_PATH); + int size = MultiByteToWideChar(CP_UTF8, 0, path, static_cast<int>(std::strlen(path)), widePath, MAX_PATH); widePath[size] = '\0'; m_fp = _wfopen(widePath, L"rb"); #endif |