summaryrefslogtreecommitdiff
path: root/src/locale_convert.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-10-09 14:53:10 +0100
committerCarl Hetherington <cth@carlh.net>2018-10-09 14:53:10 +0100
commit3ad05d11dce653b33c6f0ea2d6cdba5a7e1bf4e5 (patch)
tree4ecb0f405f61e38e87049194f52b0980d06e18c6 /src/locale_convert.cc
parent6ff5bc54fafcb9332609912514c287ac332ab7e5 (diff)
More _convert functions.
Diffstat (limited to 'src/locale_convert.cc')
-rw-r--r--src/locale_convert.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/locale_convert.cc b/src/locale_convert.cc
index 133c8a3a..0f0b5fa2 100644
--- a/src/locale_convert.cc
+++ b/src/locale_convert.cc
@@ -40,6 +40,24 @@ using std::wstring;
template<>
string
+dcp::locale_convert (unsigned char x, int, bool)
+{
+ char buffer[64];
+ snprintf (buffer, sizeof(buffer), "%hhd", x);
+ return buffer;
+}
+
+template<>
+string
+dcp::locale_convert (unsigned short int x, int, bool)
+{
+ char buffer[64];
+ snprintf (buffer, sizeof(buffer), "%hd", x);
+ return buffer;
+}
+
+template<>
+string
dcp::locale_convert (int x, int, bool)
{
char buffer[64];