aboutsummaryrefslogtreecommitdiff
path: root/src/dbwrapper.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-11-23 16:15:50 +0100
committerMarcoFalke <falke.marco@gmail.com>2020-11-23 21:19:50 +0100
commitfada14b948cac147198e3b685b5dd8cb72dc2911 (patch)
tree4a84ed9e578c3297a59e5cb06c1667551fafc346 /src/dbwrapper.h
parentfa8bdb048e65cae2d26bea3f991717a856e2fb39 (diff)
Treat CDataStream bytes as uint8_t
Also, rename CSerializeData to SerializeData
Diffstat (limited to 'src/dbwrapper.h')
-rw-r--r--src/dbwrapper.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/dbwrapper.h b/src/dbwrapper.h
index 356111b675..d58d709e7e 100644
--- a/src/dbwrapper.h
+++ b/src/dbwrapper.h
@@ -74,12 +74,12 @@ public:
{
ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey << key;
- leveldb::Slice slKey(ssKey.data(), ssKey.size());
+ leveldb::Slice slKey((const char*)ssKey.data(), ssKey.size());
ssValue.reserve(DBWRAPPER_PREALLOC_VALUE_SIZE);
ssValue << value;
ssValue.Xor(dbwrapper_private::GetObfuscateKey(parent));
- leveldb::Slice slValue(ssValue.data(), ssValue.size());
+ leveldb::Slice slValue((const char*)ssValue.data(), ssValue.size());
batch.Put(slKey, slValue);
// LevelDB serializes writes as:
@@ -99,7 +99,7 @@ public:
{
ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey << key;
- leveldb::Slice slKey(ssKey.data(), ssKey.size());
+ leveldb::Slice slKey((const char*)ssKey.data(), ssKey.size());
batch.Delete(slKey);
// LevelDB serializes erases as:
@@ -138,7 +138,7 @@ public:
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey << key;
- leveldb::Slice slKey(ssKey.data(), ssKey.size());
+ leveldb::Slice slKey((const char*)ssKey.data(), ssKey.size());
piter->Seek(slKey);
}
@@ -233,7 +233,7 @@ public:
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey << key;
- leveldb::Slice slKey(ssKey.data(), ssKey.size());
+ leveldb::Slice slKey((const char*)ssKey.data(), ssKey.size());
std::string strValue;
leveldb::Status status = pdb->Get(readoptions, slKey, &strValue);
@@ -267,7 +267,7 @@ public:
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey << key;
- leveldb::Slice slKey(ssKey.data(), ssKey.size());
+ leveldb::Slice slKey((const char*)ssKey.data(), ssKey.size());
std::string strValue;
leveldb::Status status = pdb->Get(readoptions, slKey, &strValue);
@@ -311,8 +311,8 @@ public:
ssKey2.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey1 << key_begin;
ssKey2 << key_end;
- leveldb::Slice slKey1(ssKey1.data(), ssKey1.size());
- leveldb::Slice slKey2(ssKey2.data(), ssKey2.size());
+ leveldb::Slice slKey1((const char*)ssKey1.data(), ssKey1.size());
+ leveldb::Slice slKey2((const char*)ssKey2.data(), ssKey2.size());
uint64_t size = 0;
leveldb::Range range(slKey1, slKey2);
pdb->GetApproximateSizes(&range, 1, &size);
@@ -330,8 +330,8 @@ public:
ssKey2.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey1 << key_begin;
ssKey2 << key_end;
- leveldb::Slice slKey1(ssKey1.data(), ssKey1.size());
- leveldb::Slice slKey2(ssKey2.data(), ssKey2.size());
+ leveldb::Slice slKey1((const char*)ssKey1.data(), ssKey1.size());
+ leveldb::Slice slKey2((const char*)ssKey2.data(), ssKey2.size());
pdb->CompactRange(&slKey1, &slKey2);
}
};