aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/db.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-01-09 08:39:08 -0800
committerPieter Wuille <pieter.wuille@gmail.com>2017-01-09 08:47:47 -0800
commit07fd147b9f12e9205afd66a624edce357977d615 (patch)
tree33f3d9ddf2a5c3a2866889edf3817b6656f0e61f /src/wallet/db.cpp
parent12e31127948fa4bb01c3bddc1b8c85b432f7465b (diff)
parent5113474a91b8dcac4de0e4566b9babd5da281f29 (diff)
Merge #9353: Add data() method to CDataStream (and use it)
5113474 wallet: Use CDataStream.data() (Wladimir J. van der Laan) e2300ff bench: Use CDataStream.data() (Wladimir J. van der Laan) adff950 dbwrapper: Use new .data() method of CDataStream (Wladimir J. van der Laan) a2141e4 streams: Remove special cases for ancient MSVC (Wladimir J. van der Laan) af4c44c streams: Add data() method to CDataStream (Wladimir J. van der Laan)
Diffstat (limited to 'src/wallet/db.cpp')
-rw-r--r--src/wallet/db.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/wallet/db.cpp b/src/wallet/db.cpp
index 4ae5e80236..800e1f4e29 100644
--- a/src/wallet/db.cpp
+++ b/src/wallet/db.cpp
@@ -397,15 +397,15 @@ bool CDB::Rewrite(const string& strFile, const char* pszSkip)
break;
}
if (pszSkip &&
- strncmp(&ssKey[0], pszSkip, std::min(ssKey.size(), strlen(pszSkip))) == 0)
+ strncmp(ssKey.data(), pszSkip, std::min(ssKey.size(), strlen(pszSkip))) == 0)
continue;
- if (strncmp(&ssKey[0], "\x07version", 8) == 0) {
+ if (strncmp(ssKey.data(), "\x07version", 8) == 0) {
// Update version:
ssValue.clear();
ssValue << CLIENT_VERSION;
}
- Dbt datKey(&ssKey[0], ssKey.size());
- Dbt datValue(&ssValue[0], ssValue.size());
+ Dbt datKey(ssKey.data(), ssKey.size());
+ Dbt datValue(ssValue.data(), ssValue.size());
int ret2 = pdbCopy->put(NULL, &datKey, &datValue, DB_NOOVERWRITE);
if (ret2 > 0)
fSuccess = false;