From aa8f17671af93bfc9f78cc57a956f5b94929e3f7 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 1 May 2019 11:42:53 +0800 Subject: [PATCH] Cleaning up unicode conversion --- code/nel/include/nel/misc/string_common.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/nel/include/nel/misc/string_common.h b/code/nel/include/nel/misc/string_common.h index d21b75d43..431b517d7 100644 --- a/code/nel/include/nel/misc/string_common.h +++ b/code/nel/include/nel/misc/string_common.h @@ -357,6 +357,9 @@ inline tstring mbcsToTStr(const std::string &str) { return (const tstring &)str; #define nlMbcsToTStr(str) ((const tchar *)NLMISC::asCStr(str)) #endif +inline const tchar* asCStr(const tchar *str) { return str; } +inline const tchar* asCStr(const tstring &str) { return str.c_str(); } + } // NLMISC #endif // NL_STRING_COMMON_H