diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/raw_convert.cc | 11 | ||||
| -rw-r--r-- | src/raw_convert.h | 4 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/raw_convert.cc b/src/raw_convert.cc index 37c8215f..aed965ad 100644 --- a/src/raw_convert.cc +++ b/src/raw_convert.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 Carl Hetherington <cth@carlh.net> + Copyright (C) 2014-2016 Carl Hetherington <cth@carlh.net> This file is part of libdcp. @@ -36,6 +36,7 @@ #include <boost/algorithm/string.hpp> using std::string; +using std::wstring; static string @@ -144,6 +145,14 @@ dcp::raw_convert (char v, int, bool) } template <> +string +dcp::raw_convert (wchar_t const * v, int, bool) +{ + wstring w (v); + return string (w.begin(), w.end()); +} + +template <> int dcp::raw_convert (string v, int precision, bool fixed) { diff --git a/src/raw_convert.h b/src/raw_convert.h index 28dcd648..7f31ac37 100644 --- a/src/raw_convert.h +++ b/src/raw_convert.h @@ -98,6 +98,10 @@ raw_convert (std::string v, int, bool); template <> std::string +raw_convert (wchar_t const * v, int, bool); + +template <> +std::string raw_convert (char v, int, bool); template <> |
