summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/compose.hpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/lib/compose.hpp b/src/lib/compose.hpp
index 85a9e9b0f..425aceabf 100644
--- a/src/lib/compose.hpp
+++ b/src/lib/compose.hpp
@@ -121,42 +121,50 @@ namespace StringPrivate
}
template <>
- inline void write(std::string& s, const int64_t& obj)
+ inline void write(std::string& s, const int32_t& obj)
{
char buffer[64];
#ifdef DCPOMATIC_WINDOWS
- __mingw_snprintf(buffer, 64, "%" PRId64, obj);
+ __mingw_snprintf(buffer, 64, "%" PRId32, obj);
#else
- snprintf(buffer, 64, "%" PRId64, obj);
+ snprintf(buffer, 64, "%" PRId32, obj);
#endif
s += buffer;
}
template <>
- inline void write(std::string& s, const uint64_t& obj)
+ inline void write(std::string& s, const uint32_t& obj)
{
char buffer[64];
#ifdef DCPOMATIC_WINDOWS
- __mingw_snprintf(buffer, 64, "%" PRIu64, obj);
+ __mingw_snprintf(buffer, 64, "%" PRIu32, obj);
#else
- snprintf(buffer, 64, "%" PRIu64, obj);
+ snprintf(buffer, 64, "%" PRIu32, obj);
#endif
s += buffer;
}
template <>
- inline void write(std::string& s, const int& obj)
+ inline void write(std::string& s, const int64_t& obj)
{
char buffer[64];
- snprintf(buffer, 64, "%d", obj);
+#ifdef DCPOMATIC_WINDOWS
+ __mingw_snprintf(buffer, 64, "%" PRId64, obj);
+#else
+ snprintf(buffer, 64, "%" PRId64, obj);
+#endif
s += buffer;
}
template <>
- inline void write(std::string& s, const unsigned int& obj)
+ inline void write(std::string& s, const uint64_t& obj)
{
char buffer[64];
- snprintf(buffer, 64, "%ud", obj);
+#ifdef DCPOMATIC_WINDOWS
+ __mingw_snprintf(buffer, 64, "%" PRIu64, obj);
+#else
+ snprintf(buffer, 64, "%" PRIu64, obj);
+#endif
s += buffer;
}