diff options
Diffstat (limited to 'common/utils.h')
-rw-r--r-- | common/utils.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/common/utils.h b/common/utils.h index 7066d79..ec1d5b1 100644 --- a/common/utils.h +++ b/common/utils.h | |||
@@ -27,6 +27,15 @@ namespace Sink { | |||
27 | QByteArray createUuid(); | 27 | QByteArray createUuid(); |
28 | 28 | ||
29 | template <typename T> | 29 | template <typename T> |
30 | static QByteArray padNumber(T number); | ||
31 | |||
32 | template <> | ||
33 | QByteArray padNumber<size_t>(size_t number) | ||
34 | { | ||
35 | return padNumber<qint64>(number); | ||
36 | } | ||
37 | |||
38 | template <typename T> | ||
30 | static QByteArray padNumber(T number) | 39 | static QByteArray padNumber(T number) |
31 | { | 40 | { |
32 | static T uint_num_digits = (T)std::log10(std::numeric_limits<T>::max()) + 1; | 41 | static T uint_num_digits = (T)std::log10(std::numeric_limits<T>::max()) + 1; |