aboutsummaryrefslogtreecommitdiffstats
path: root/alc/compat.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2019-08-11 18:50:07 -0700
committerChris Robinson <[email protected]>2019-08-11 18:50:07 -0700
commite200569cd319448d12099f27a2713c69da382d26 (patch)
tree5475e5aa20505bd403b46053321dd2d6a019ac5d /alc/compat.h
parent7118733458bc388a900677da6e0d4e4244d0f536 (diff)
Move the wstr converters to a separate header
Diffstat (limited to 'alc/compat.h')
-rw-r--r--alc/compat.h30
1 files changed, 0 insertions, 30 deletions
diff --git a/alc/compat.h b/alc/compat.h
index 648fa5b1..f2e10513 100644
--- a/alc/compat.h
+++ b/alc/compat.h
@@ -10,36 +10,6 @@
#include <string>
#include <fstream>
-inline std::string wstr_to_utf8(const WCHAR *wstr)
-{
- std::string ret;
-
- int len = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, nullptr, 0, nullptr, nullptr);
- if(len > 0)
- {
- ret.resize(len);
- WideCharToMultiByte(CP_UTF8, 0, wstr, -1, &ret[0], len, nullptr, nullptr);
- ret.pop_back();
- }
-
- return ret;
-}
-
-inline std::wstring utf8_to_wstr(const char *str)
-{
- std::wstring ret;
-
- int len = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0);
- if(len > 0)
- {
- ret.resize(len);
- MultiByteToWideChar(CP_UTF8, 0, str, -1, &ret[0], len);
- ret.pop_back();
- }
-
- return ret;
-}
-
namespace al {