aboutsummaryrefslogtreecommitdiff
path: root/src/file_reader.hpp
diff options
context:
space:
mode:
authorVitaly Novichkov <admin@wohlnet.ru>2018-06-21 05:47:20 +0300
committerVitaly Novichkov <admin@wohlnet.ru>2018-06-21 05:47:20 +0300
commit6b0ca0b306b23a313491742f0c78debb49a037e9 (patch)
tree200a3850cc9d3de161da22fbe1c82faef26d3551 /src/file_reader.hpp
parent86038a9ccafd7e848e67535f7995d86601cb1e0f (diff)
downloadlibADLMIDI-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.hpp7
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