diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-16 19:18:59 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-07-16 19:18:59 +0200 |
commit | 9448988676c524e4080e18e861dbd7e1def84e44 (patch) | |
tree | 451c1b31e1c268b8f5fee39b7ad49b8166837ce8 | |
parent | 27c731783a1b736cadf1f51062e6006ecd6eb8a0 (diff) | |
download | sink-9448988676c524e4080e18e861dbd7e1def84e44.tar.gz sink-9448988676c524e4080e18e861dbd7e1def84e44.zip |
No return value needed here.
-rw-r--r-- | common/storage/entitystore.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/common/storage/entitystore.cpp b/common/storage/entitystore.cpp index 22e5ae3..1ac87b7 100644 --- a/common/storage/entitystore.cpp +++ b/common/storage/entitystore.cpp | |||
@@ -516,9 +516,8 @@ void EntityStore::readLatest(const QByteArray &type, const QByteArray &uid, cons | |||
516 | { | 516 | { |
517 | auto db = DataStore::mainDatabase(d->getTransaction(), type); | 517 | auto db = DataStore::mainDatabase(d->getTransaction(), type); |
518 | db.findLatest(uid, | 518 | db.findLatest(uid, |
519 | [=](const QByteArray &key, const QByteArray &value) -> bool { | 519 | [=](const QByteArray &key, const QByteArray &value) { |
520 | callback(DataStore::uidFromKey(key), Sink::EntityBuffer(value.data(), value.size())); | 520 | callback(DataStore::uidFromKey(key), Sink::EntityBuffer(value.data(), value.size())); |
521 | return false; | ||
522 | }, | 521 | }, |
523 | [&](const DataStore::Error &error) { SinkWarningCtx(d->logCtx) << "Error during query: " << error.message << uid; }); | 522 | [&](const DataStore::Error &error) { SinkWarningCtx(d->logCtx) << "Error during query: " << error.message << uid; }); |
524 | } | 523 | } |
@@ -653,7 +652,7 @@ bool EntityStore::exists(const QByteArray &type, const QByteArray &uid) | |||
653 | bool alreadyRemoved = false; | 652 | bool alreadyRemoved = false; |
654 | DataStore::mainDatabase(d->transaction, type) | 653 | DataStore::mainDatabase(d->transaction, type) |
655 | .findLatest(uid, | 654 | .findLatest(uid, |
656 | [&found, &alreadyRemoved](const QByteArray &key, const QByteArray &data) -> bool { | 655 | [&found, &alreadyRemoved](const QByteArray &key, const QByteArray &data) { |
657 | auto entity = GetEntity(data.data()); | 656 | auto entity = GetEntity(data.data()); |
658 | if (entity && entity->metadata()) { | 657 | if (entity && entity->metadata()) { |
659 | auto metadata = GetMetadata(entity->metadata()->Data()); | 658 | auto metadata = GetMetadata(entity->metadata()->Data()); |
@@ -662,7 +661,6 @@ bool EntityStore::exists(const QByteArray &type, const QByteArray &uid) | |||
662 | alreadyRemoved = true; | 661 | alreadyRemoved = true; |
663 | } | 662 | } |
664 | } | 663 | } |
665 | return false; | ||
666 | }, | 664 | }, |
667 | [&](const DataStore::Error &error) { SinkWarningCtx(d->logCtx) << "Failed to read old revision from storage: " << error.message; }); | 665 | [&](const DataStore::Error &error) { SinkWarningCtx(d->logCtx) << "Failed to read old revision from storage: " << error.message; }); |
668 | if (!found) { | 666 | if (!found) { |