diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-08-15 13:25:45 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-08-15 13:25:45 +0100 |
| commit | ce66af3d9056d2b8de6d5b2f8ce0caa100a66dec (patch) | |
| tree | e259a0285662cadf6fba0b9dc4859d19701ca65f /src/locale_convert.cc | |
| parent | 886a2080dd9aa90fff8a567b0e4df43b737e36c6 (diff) | |
Hack.
Diffstat (limited to 'src/locale_convert.cc')
| -rw-r--r-- | src/locale_convert.cc | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/src/locale_convert.cc b/src/locale_convert.cc index 3858006e..1a25ceeb 100644 --- a/src/locale_convert.cc +++ b/src/locale_convert.cc @@ -39,19 +39,37 @@ using std::string; template<> string -dcp::locale_convert (int x, int, bool) +dcp::locale_convert (int16_t x, int, bool) { char buffer[64]; - snprintf (buffer, sizeof(buffer), "%d", x); + snprintf (buffer, sizeof(buffer), "%" PRId16, x); return buffer; } template<> string -dcp::locale_convert (unsigned int x, int, bool) +dcp::locale_convert (uint16_t x, int, bool) { char buffer[64]; - snprintf (buffer, sizeof(buffer), "%ud", x); + snprintf (buffer, sizeof(buffer), "%" PRIu16, x); + return buffer; +} + +template<> +string +dcp::locale_convert (int32_t x, int, bool) +{ + char buffer[64]; + snprintf (buffer, sizeof(buffer), "%" PRId32, x); + return buffer; +} + +template<> +string +dcp::locale_convert (uint32_t x, int, bool) +{ + char buffer[64]; + snprintf (buffer, sizeof(buffer), "%" PRIu32, x); return buffer; } |
