From 8cb625dc1529c2ba0e63698c8aa8e4644e88e676 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Tue, 29 Sep 2015 17:16:47 +0100 Subject: [PATCH] Fix a couple of size_t/int warnings. --- src/backend/helpers/helpers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/helpers/helpers.cpp b/src/backend/helpers/helpers.cpp index 3aa6e5e4..09150979 100644 --- a/src/backend/helpers/helpers.cpp +++ b/src/backend/helpers/helpers.cpp @@ -165,14 +165,14 @@ namespace loot { //Helper to turn UTF8 strings into strings that can be used by WinAPI. std::wstring ToWinWide(const std::string& str) { - int len = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), str.length(), 0, 0); + size_t len = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), str.length(), 0, 0); std::wstring wstr(len, 0); MultiByteToWideChar(CP_UTF8, 0, str.c_str(), str.length(), &wstr[0], len); return wstr; } std::string FromWinWide(const std::wstring& wstr) { - int len = WideCharToMultiByte(CP_UTF8, 0, wstr.c_str(), wstr.length(), NULL, 0, NULL, NULL); + size_t len = WideCharToMultiByte(CP_UTF8, 0, wstr.c_str(), wstr.length(), NULL, 0, NULL, NULL); std::string str(len, 0); WideCharToMultiByte(CP_UTF8, 0, wstr.c_str(), wstr.length(), &str[0], len, NULL, NULL); return str;