diff options
author | Minijackson <minijackson@riseup.net> | 2018-08-21 13:40:59 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2018-08-21 14:04:56 +0200 |
commit | d320030c53cf9fd4338ca3f6da00a9b876c13397 (patch) | |
tree | 6e9633c3a834bb50a55bf4d6ce60dce32de987c0 /tests/pipelinetest.cpp | |
parent | 23e13c91e44e9d1fcbe2215f16d10117de4d0e84 (diff) | |
download | sink-d320030c53cf9fd4338ca3f6da00a9b876c13397.tar.gz sink-d320030c53cf9fd4338ca3f6da00a9b876c13397.zip |
Refactor QByteArray ↔ size_t conversions into utils
Diffstat (limited to 'tests/pipelinetest.cpp')
-rw-r--r-- | tests/pipelinetest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/pipelinetest.cpp b/tests/pipelinetest.cpp index 47d443f..34ee3a5 100644 --- a/tests/pipelinetest.cpp +++ b/tests/pipelinetest.cpp | |||
@@ -35,7 +35,7 @@ static QList<Sink::Storage::Key> getKeys(const QByteArray &dbEnv, const QByteArr | |||
35 | auto db = transaction.openDatabase(name, nullptr, false); | 35 | auto db = transaction.openDatabase(name, nullptr, false); |
36 | QList<Sink::Storage::Key> result; | 36 | QList<Sink::Storage::Key> result; |
37 | db.scan("", [&](const QByteArray &key, const QByteArray &value) { | 37 | db.scan("", [&](const QByteArray &key, const QByteArray &value) { |
38 | size_t revision = *reinterpret_cast<const char *>(key.constData()); | 38 | size_t revision = Sink::byteArrayToSizeT(value); |
39 | result << Sink::Storage::Key(Sink::Storage::Identifier::fromDisplayByteArray( | 39 | result << Sink::Storage::Key(Sink::Storage::Identifier::fromDisplayByteArray( |
40 | Sink::Storage::DataStore::getUidFromRevision(transaction, revision)), | 40 | Sink::Storage::DataStore::getUidFromRevision(transaction, revision)), |
41 | revision); | 41 | revision); |