mirror of https://github.com/AxioDL/kabufuda.git
Windows fixes
This commit is contained in:
parent
ffbe61508f
commit
c6fcf45546
|
@ -195,9 +195,9 @@ public:
|
|||
explicit SystemUTF8Conv(SystemStringView str) : m_utf8(WideToUTF8(str)) {}
|
||||
std::string_view str() const { return m_utf8; }
|
||||
const char* c_str() const { return m_utf8.c_str(); }
|
||||
std::string operator+(std::string_view other) const { return m_utf8 + other; }
|
||||
std::string operator+(std::string_view other) const { return m_utf8 + other.data(); }
|
||||
};
|
||||
inline std::string operator+(std::string_view lhs, const SystemUTF8Conv& rhs) { return lhs + std::string(rhs); }
|
||||
inline std::string operator+(std::string_view lhs, const SystemUTF8Conv& rhs) { return std::string(lhs) + rhs.c_str(); }
|
||||
class SystemStringConv
|
||||
{
|
||||
std::wstring m_sys;
|
||||
|
@ -206,9 +206,9 @@ public:
|
|||
explicit SystemStringConv(std::string_view str) : m_sys(UTF8ToWide(str)) {}
|
||||
SystemStringView sys_str() const { return m_sys; }
|
||||
const SystemChar* c_str() const { return m_sys.c_str(); }
|
||||
std::wstring operator+(const std::wstring_view other) const { return m_sys + other; }
|
||||
std::wstring operator+(const std::wstring_view other) const { return m_sys + other.data(); }
|
||||
};
|
||||
inline std::wstring operator+(const std::wstring_view lhs, const SystemStringConv& rhs) { return lhs + std::wstring(rhs); }
|
||||
inline std::wstring operator+(const std::wstring_view lhs, const SystemStringConv& rhs) { return std::wstring(lhs) + rhs.c_str(); }
|
||||
#ifndef _S
|
||||
#define _S(val) L##val
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue