From 6b0ca0b306b23a313491742f0c78debb49a037e9 Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Thu, 21 Jun 2018 05:47:20 +0300 Subject: Attempt to fix build on Windows --- src/file_reader.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') 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 -#include +#include // std::string +#include // std::fopen, std::fread, std::fseek, std::ftell, std::fclose, std::feof #ifdef _WIN32 +#include // std::strlen #include // 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(std::strlen(path)), widePath, MAX_PATH); widePath[size] = '\0'; m_fp = _wfopen(widePath, L"rb"); #endif -- cgit v1.2.3