]> git.sesse.net Git - ccbs/blobdiff - bigscreen/widestring.h
In RotateScreen destructor, do not leak subscreen surfaces.
[ccbs] / bigscreen / widestring.h
index 437428c8ad316ff2c05341935053fb81c2275f07..a2f2a245423322042d234d226df6e1be89ac9d89 100644 (file)
@@ -2,6 +2,7 @@
 #define _WIDESTRING_H 1
 
 #include <string>
+#include <pqxx/util>
 
 // UCS-4 string with support for getting from UTF-8
 class widestring : public std::wstring
@@ -9,7 +10,20 @@ class widestring : public std::wstring
 public:
        widestring();
        widestring(const char *from);
+       widestring(const std::string &from);
+       widestring(const std::wstring &from);
        void operator= (const char *from);
 };
 
+namespace pqxx
+{
+
+template<>
+inline void from_string<widestring>(const char *from, widestring &to)
+{
+       to = from;
+}
+
+}
+
 #endif /* !defined(_WIDESTRING_H) */