summaryrefslogtreecommitdiff
path: root/shared/string_conv.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:08:42 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:08:42 +0200
commitc32707148292d104c66276b43796d6057c8c7a5d (patch)
treebb83513f4aff24153e21a4ec92e34e4c27651b1f /shared/string_conv.h
parent3.9 (diff)
downloadFreeFileSync-c32707148292d104c66276b43796d6057c8c7a5d.tar.gz
FreeFileSync-c32707148292d104c66276b43796d6057c8c7a5d.tar.bz2
FreeFileSync-c32707148292d104c66276b43796d6057c8c7a5d.zip
3.10
Diffstat (limited to 'shared/string_conv.h')
-rw-r--r--shared/string_conv.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/shared/string_conv.h b/shared/string_conv.h
index bbaef713..bb8f6c7e 100644
--- a/shared/string_conv.h
+++ b/shared/string_conv.h
@@ -14,8 +14,8 @@ namespace ffs3
{
//conversion from Zstring to wxString
wxString zToWx(const Zstring& str);
-wxString zToWx(const DefaultChar* str);
-wxString zToWx(DefaultChar ch);
+wxString zToWx(const Zchar* str);
+wxString zToWx(Zchar ch);
//conversion from wxString to Zstring
Zstring wxToZ(const wxString& str);
Zstring wxToZ(const wxChar* str);
@@ -52,39 +52,39 @@ Zstring wxToZ(wxChar ch);
inline
wxString zToWx(const Zstring& str)
{
-#ifdef ZSTRING_CHAR
- return wxString::FromUTF8(str.c_str(), str.length());
-#elif defined ZSTRING_WIDE_CHAR
+#ifdef FFS_WIN
return wxString(str.c_str(), str.length());
+#elif defined FFS_LINUX
+ return wxString::FromUTF8(str.c_str(), str.length());
#endif
}
inline
-wxString zToWx(const DefaultChar* str)
+wxString zToWx(const Zchar* str)
{
-#ifdef ZSTRING_CHAR
- return wxString::FromUTF8(str);
-#elif defined ZSTRING_WIDE_CHAR
+#ifdef FFS_WIN
return str;
+#elif defined FFS_LINUX
+ return wxString::FromUTF8(str);
#endif
}
inline
-wxString zToWx(DefaultChar ch)
+wxString zToWx(Zchar ch)
{
- return zToWx(Zstring() + ch);
+ return zToWx(Zstring(ch));
}
//-----------------------------------------------------------------
inline
Zstring wxToZ(const wxString& str)
{
-#ifdef ZSTRING_CHAR
- return Zstring(str.ToUTF8());
-#elif defined ZSTRING_WIDE_CHAR
+#ifdef FFS_WIN
return Zstring(str.c_str(), str.length());
+#elif defined FFS_LINUX
+ return Zstring(str.ToUTF8());
#endif
}
@@ -92,10 +92,10 @@ Zstring wxToZ(const wxString& str)
inline
Zstring wxToZ(const wxChar* str)
{
-#ifdef ZSTRING_CHAR
- return Zstring(wxString(str).ToUTF8());
-#elif defined ZSTRING_WIDE_CHAR
+#ifdef FFS_WIN
return str;
+#elif defined FFS_LINUX
+ return Zstring(wxString(str).ToUTF8());
#endif
}
bgstack15