summaryrefslogtreecommitdiffstats
path: root/common/typeindex.cpp
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2018-06-26 11:44:11 +0200
committerMinijackson <minijackson@riseup.net>2018-07-04 15:37:14 +0200
commit922e0979e2c27ff8dbc765ae151d17c7815b98a0 (patch)
treecb031c5d3ccc31ea576f66b4f718c17f5bb0775c /common/typeindex.cpp
parent06f30d0f0d0051df97d4c34cd1a80b14857c9e9c (diff)
downloadsink-922e0979e2c27ff8dbc765ae151d17c7815b98a0.tar.gz
sink-922e0979e2c27ff8dbc765ae151d17c7815b98a0.zip
[Storage] Implement Key API
Diffstat (limited to 'common/typeindex.cpp')
-rw-r--r--common/typeindex.cpp9
1 files changed, 0 insertions, 9 deletions
diff --git a/common/typeindex.cpp b/common/typeindex.cpp
index b18791f..0b78d59 100644
--- a/common/typeindex.cpp
+++ b/common/typeindex.cpp
@@ -25,8 +25,6 @@
25#include <QDateTime> 25#include <QDateTime>
26#include <QDataStream> 26#include <QDataStream>
27 27
28#include <cmath>
29
30using namespace Sink; 28using namespace Sink;
31 29
32static QByteArray getByteArray(const QVariant &value) 30static QByteArray getByteArray(const QVariant &value)
@@ -53,13 +51,6 @@ static QByteArray getByteArray(const QVariant &value)
53 return "toplevel"; 51 return "toplevel";
54} 52}
55 53
56template <typename T>
57static QByteArray padNumber(T number)
58{
59 static T uint_num_digits = (T)std::log10(std::numeric_limits<T>::max()) + 1;
60 return QByteArray::number(number).rightJustified(uint_num_digits, '0');
61}
62
63static QByteArray toSortableByteArrayImpl(const QDateTime &date) 54static QByteArray toSortableByteArrayImpl(const QDateTime &date)
64{ 55{
65 // Sort invalid last 56 // Sort invalid last