diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-10-27 17:54:13 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-06 07:39:33 +0200 |
commit | 0f3b3c10d63140509ebcd466b281a78e7f745225 (patch) | |
tree | 3e01fbe0025a5a9d6900a969bb7d87516028fb4d /src/FileUtil.cpp | |
parent | 1c6ab0b07f18f2c6919ebb45c40da1e00b7ecf83 (diff) |
Fix build for windows, release new windows build
Diffstat (limited to 'src/FileUtil.cpp')
-rw-r--r-- | src/FileUtil.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/FileUtil.cpp b/src/FileUtil.cpp index d33c94d..d07a074 100644 --- a/src/FileUtil.cpp +++ b/src/FileUtil.cpp @@ -54,6 +54,11 @@ namespace sibs { return FileString(utf8Str.data, utf8Str.data + utf8Str.size); } + + FileString toFileString(const char *str) + { + return str; + } #else std::string toUtf8(const sibs::FileString &input) { @@ -96,6 +101,13 @@ namespace sibs return result; } + FileString toFileString(const char *str) + { + FileString result; + utf8::utf8to16(str, str + strlen(str), std::back_inserter(result)); + return result; + } + FileString getLastErrorAsString() { DWORD errorMessageId = GetLastError(); |