summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/m_system_cpp.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/m_system_cpp.h b/include/m_system_cpp.h
index 35392c78e2..1cd2163f10 100644
--- a/include/m_system_cpp.h
+++ b/include/m_system_cpp.h
@@ -352,6 +352,16 @@ public:
#endif
};
+class Utf2T : public ptrW
+{
+public:
+ __forceinline Utf2T(const char *str) : ptrW(mir_utf8decodeW(str)) {}
+ __forceinline operator wchar_t* () const { return data; }
+ #ifdef _XSTRING_
+ std::wstring str() const { return std::wstring(data); }
+ #endif
+};
+
///////////////////////////////////////////////////////////////////////////////
// basic class for classes that should be cleared inside new()