aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/common/string_util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/string_util.cpp')
-rw-r--r--src/common/string_util.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp
index 7dc0ba7b..b2f7f7b1 100644
--- a/src/common/string_util.cpp
+++ b/src/common/string_util.cpp
@@ -2,9 +2,13 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
-#include <boost/range/algorithm.hpp>
+#include <cctype>
+#include <cerrno>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <boost/range/algorithm/transform.hpp>
-#include "common/common_funcs.h"
#include "common/common_paths.h"
#include "common/logging/log.h"
#include "common/string_util.h"
@@ -12,6 +16,7 @@
#ifdef _MSC_VER
#include <Windows.h>
#include <codecvt>
+ #include "common/common_funcs.h"
#else
#include <iconv.h>
#endif
@@ -308,7 +313,7 @@ static std::string UTF16ToUTF8(const std::wstring& input)
std::string output;
output.resize(size);
- if (size == 0 || size != WideCharToMultiByte(CP_UTF8, 0, input.data(), input.size(), &output[0], output.size(), nullptr, nullptr))
+ if (size == 0 || size != WideCharToMultiByte(CP_UTF8, 0, input.data(), static_cast<int>(input.size()), &output[0], static_cast<int>(output.size()), nullptr, nullptr))
output.clear();
return output;