summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/storage.h4
-rw-r--r--common/storage_lmdb.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/common/storage.h b/common/storage.h
index 77f11f9..fd35274 100644
--- a/common/storage.h
+++ b/common/storage.h
@@ -54,6 +54,7 @@ public:
54 class Transaction 54 class Transaction
55 { 55 {
56 public: 56 public:
57 Transaction();
57 ~Transaction(); 58 ~Transaction();
58 bool commit(const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>()); 59 bool commit(const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>());
59 void abort(); 60 void abort();
@@ -79,7 +80,7 @@ public:
79 */ 80 */
80 int scan(const QByteArray &k, 81 int scan(const QByteArray &k,
81 const std::function<bool(const QByteArray &key, const QByteArray &value)> &resultHandler, 82 const std::function<bool(const QByteArray &key, const QByteArray &value)> &resultHandler,
82 const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>()); 83 const std::function<void(const Storage::Error &error)> &errorHandler = std::function<void(const Storage::Error &error)>()) const;
83 84
84 Transaction(Transaction&& other) : d(other.d) 85 Transaction(Transaction&& other) : d(other.d)
85 { 86 {
@@ -96,7 +97,6 @@ public:
96 Transaction& operator=(Transaction& other); 97 Transaction& operator=(Transaction& other);
97 friend Storage; 98 friend Storage;
98 class Private; 99 class Private;
99 Transaction();
100 Transaction(Private*); 100 Transaction(Private*);
101 Private *d; 101 Private *d;
102 }; 102 };
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp
index 230409f..d3c52b7 100644
--- a/common/storage_lmdb.cpp
+++ b/common/storage_lmdb.cpp
@@ -165,7 +165,7 @@ bool Storage::Transaction::write(const QByteArray &sKey, const QByteArray &sValu
165 165
166int Storage::Transaction::scan(const QByteArray &k, 166int Storage::Transaction::scan(const QByteArray &k,
167 const std::function<bool(const QByteArray &key, const QByteArray &value)> &resultHandler, 167 const std::function<bool(const QByteArray &key, const QByteArray &value)> &resultHandler,
168 const std::function<void(const Storage::Error &error)> &errorHandler) 168 const std::function<void(const Storage::Error &error)> &errorHandler) const
169{ 169{
170 if (!d || !d->transaction) { 170 if (!d || !d->transaction) {
171 Error error(d->name.toLatin1(), ErrorCodes::NotOpen, "Not open"); 171 Error error(d->name.toLatin1(), ErrorCodes::NotOpen, "Not open");