aboutsummaryrefslogtreecommitdiff
path: root/src/dbwrapper.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-12-15 17:22:03 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-12-15 17:22:03 +0100
commitadff950faeea95249df5f7536159701ea2202255 (patch)
treef6034d13315b5851a40e0d008b1a5d9b0e49c99c /src/dbwrapper.h
parenta2141e415aed26bab756220d8707b5fb33e6fef8 (diff)
dbwrapper: Use new .data() method of CDataStream
Diffstat (limited to 'src/dbwrapper.h')
-rw-r--r--src/dbwrapper.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dbwrapper.h b/src/dbwrapper.h
index 4a79bbd17d..c5e92e01f1 100644
--- a/src/dbwrapper.h
+++ b/src/dbwrapper.h
@@ -65,13 +65,13 @@ public:
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey << key;
- leveldb::Slice slKey(&ssKey[0], ssKey.size());
+ leveldb::Slice slKey(ssKey.data(), ssKey.size());
CDataStream ssValue(SER_DISK, CLIENT_VERSION);
ssValue.reserve(DBWRAPPER_PREALLOC_VALUE_SIZE);
ssValue << value;
ssValue.Xor(dbwrapper_private::GetObfuscateKey(parent));
- leveldb::Slice slValue(&ssValue[0], ssValue.size());
+ leveldb::Slice slValue(ssValue.data(), ssValue.size());
batch.Put(slKey, slValue);
}
@@ -82,7 +82,7 @@ public:
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey << key;
- leveldb::Slice slKey(&ssKey[0], ssKey.size());
+ leveldb::Slice slKey(ssKey.data(), ssKey.size());
batch.Delete(slKey);
}
@@ -112,7 +112,7 @@ public:
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey << key;
- leveldb::Slice slKey(&ssKey[0], ssKey.size());
+ leveldb::Slice slKey(ssKey.data(), ssKey.size());
piter->Seek(slKey);
}
@@ -205,7 +205,7 @@ public:
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey << key;
- leveldb::Slice slKey(&ssKey[0], ssKey.size());
+ leveldb::Slice slKey(ssKey.data(), ssKey.size());
std::string strValue;
leveldb::Status status = pdb->Get(readoptions, slKey, &strValue);
@@ -239,7 +239,7 @@ public:
CDataStream ssKey(SER_DISK, CLIENT_VERSION);
ssKey.reserve(DBWRAPPER_PREALLOC_KEY_SIZE);
ssKey << key;
- leveldb::Slice slKey(&ssKey[0], ssKey.size());
+ leveldb::Slice slKey(ssKey.data(), ssKey.size());
std::string strValue;
leveldb::Status status = pdb->Get(readoptions, slKey, &strValue);