diff options
author | Minijackson <minijackson@riseup.net> | 2018-08-21 13:40:59 +0200 |
---|---|---|
committer | Minijackson <minijackson@riseup.net> | 2018-08-21 13:40:59 +0200 |
commit | 91f0b273fc2072a4d7c96ba83b37fe45b3cda1ef (patch) | |
tree | ad44891a5bb90cef9eed398f074cea979f057440 /tests/pipelinetest.cpp | |
parent | 6ef0a29d8e468de50c9dcf260db45957d028a083 (diff) | |
download | sink-91f0b273fc2072a4d7c96ba83b37fe45b3cda1ef.tar.gz sink-91f0b273fc2072a4d7c96ba83b37fe45b3cda1ef.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); |