diff options
-rw-r--r-- | common/storage.h | 2 | ||||
-rw-r--r-- | common/storage_lmdb.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/common/storage.h b/common/storage.h index d8378e2..099b45f 100644 --- a/common/storage.h +++ b/common/storage.h | |||
@@ -52,7 +52,7 @@ public: | |||
52 | //TODO: row removal | 52 | //TODO: row removal |
53 | //TODO: cursor based read | 53 | //TODO: cursor based read |
54 | //TODO: query? | 54 | //TODO: query? |
55 | bool write(void const *key, size_t keySize, void const *value, size_t valueSize); | 55 | bool write(const void *key, size_t keySize, const void *value, size_t valueSize); |
56 | bool write(const std::string &sKey, const std::string &sValue); | 56 | bool write(const std::string &sKey, const std::string &sValue); |
57 | void read(const std::string &sKey, | 57 | void read(const std::string &sKey, |
58 | const std::function<bool(const std::string &value)> &resultHandler); | 58 | const std::function<bool(const std::string &value)> &resultHandler); |
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp index a2a95c3..c97f9ce 100644 --- a/common/storage_lmdb.cpp +++ b/common/storage_lmdb.cpp | |||
@@ -216,7 +216,7 @@ void Storage::abortTransaction() | |||
216 | d->transaction = 0; | 216 | d->transaction = 0; |
217 | } | 217 | } |
218 | 218 | ||
219 | bool Storage::write(void const *keyPtr, size_t keySize, void const *valuePtr, size_t valueSize) | 219 | bool Storage::write(const void *keyPtr, size_t keySize, const void *valuePtr, size_t valueSize) |
220 | { | 220 | { |
221 | if (!d->env) { | 221 | if (!d->env) { |
222 | return false; | 222 | return false; |
@@ -354,12 +354,12 @@ void Storage::scan(const char *keyData, uint keySize, | |||
354 | } | 354 | } |
355 | } | 355 | } |
356 | 356 | ||
357 | void Storage::remove(void const *keyData, uint keySize) | 357 | void Storage::remove(const void *keyData, uint keySize) |
358 | { | 358 | { |
359 | remove(keyData, keySize, basicErrorHandler()); | 359 | remove(keyData, keySize, basicErrorHandler()); |
360 | } | 360 | } |
361 | 361 | ||
362 | void Storage::remove(void const *keyData, uint keySize, const std::function<void(const Storage::Error &error)> &errorHandler) | 362 | void Storage::remove(const void *keyData, uint keySize, const std::function<void(const Storage::Error &error)> &errorHandler) |
363 | { | 363 | { |
364 | if (!d->env) { | 364 | if (!d->env) { |
365 | Error error(d->name.toStdString(), -1, "Not open"); | 365 | Error error(d->name.toStdString(), -1, "Not open"); |