Invalid definition removals

This commit is contained in:
Jack Andersen 2017-07-02 18:24:22 -10:00
parent a50b0c2322
commit b975184530
1 changed files with 0 additions and 58 deletions

View File

@ -199,36 +199,6 @@ enum class FileLockType
typedef wchar_t SystemChar; typedef wchar_t SystemChar;
static inline size_t StrLen(const SystemChar* str) { return wcslen(str); } static inline size_t StrLen(const SystemChar* str) { return wcslen(str); }
typedef std::wstring SystemString; typedef std::wstring SystemString;
static inline void ToLower(SystemString& str) { std::transform(str.begin(), str.end(), str.begin(), towlower); }
static inline void ToUpper(SystemString& str) { std::transform(str.begin(), str.end(), str.begin(), towupper); }
class SystemUTF8View
{
std::string m_utf8;
public:
explicit SystemUTF8View(const SystemString& str) : m_utf8(WideToUTF8(str)) {}
operator const std::string&() const { return m_utf8; }
const std::string& str() const { return m_utf8; }
const char* c_str() const { return m_utf8.c_str(); }
std::string operator+(const std::string& other) const { return m_utf8 + other; }
std::string operator+(const char* other) const { return m_utf8 + other; }
};
inline std::string operator+(const std::string& lhs, const SystemUTF8View& rhs) { return lhs + std::string(rhs); }
inline std::string operator+(const char* lhs, const SystemUTF8View& rhs) { return lhs + std::string(rhs); }
class SystemStringView
{
std::wstring m_sys;
public:
explicit SystemStringView(const std::string& str) : m_sys(UTF8ToWide(str)) {}
operator const std::wstring&() const { return m_sys; }
const std::wstring& sys_str() const { return m_sys; }
const SystemChar* c_str() const { return m_sys.c_str(); }
std::wstring operator+(const std::wstring& other) const { return m_sys + other; }
std::wstring operator+(const wchar_t* other) const { return m_sys + other; }
};
inline std::wstring operator+(const std::wstring& lhs, const SystemStringView& rhs) { return lhs + std::wstring(rhs); }
inline std::wstring operator+(const wchar_t* lhs, const SystemStringView& rhs) { return lhs + std::wstring(rhs); }
#ifndef _S #ifndef _S
#define _S(val) L##val #define _S(val) L##val
#endif #endif
@ -237,34 +207,6 @@ typedef struct _stat Sstat;
typedef char SystemChar; typedef char SystemChar;
static inline size_t StrLen(const SystemChar* str) { return strlen(str); } static inline size_t StrLen(const SystemChar* str) { return strlen(str); }
typedef std::string SystemString; typedef std::string SystemString;
class SystemUTF8View
{
const std::string& m_utf8;
public:
explicit SystemUTF8View(const SystemString& str) : m_utf8(str) {}
operator const std::string&() const { return m_utf8; }
const std::string& str() const { return m_utf8; }
const char* c_str() const { return m_utf8.c_str(); }
std::string operator+(const std::string& other) const { return std::string(m_utf8) + other; }
std::string operator+(const char* other) const { return std::string(m_utf8) + other; }
};
inline std::string operator+(const std::string& lhs, const SystemUTF8View& rhs) { return lhs + std::string(rhs); }
inline std::string operator+(const char* lhs, const SystemUTF8View& rhs) { return lhs + std::string(rhs); }
class SystemStringView
{
const std::string& m_sys;
public:
explicit SystemStringView(const std::string& str) : m_sys(str) {}
operator const std::string&() const { return m_sys; }
const std::string& sys_str() const { return m_sys; }
const SystemChar* c_str() const { return m_sys.c_str(); }
std::string operator+(const std::string& other) const { return m_sys + other; }
std::string operator+(const char* other) const { return m_sys + other; }
};
inline std::string operator+(const std::string& lhs, const SystemStringView& rhs) { return lhs + std::string(rhs); }
inline std::string operator+(const char* lhs, const SystemStringView& rhs) { return lhs + std::string(rhs); }
#ifndef _S #ifndef _S
#define _S(val) val #define _S(val) val
#endif #endif