@@ -168,9 +168,9 @@ void CDBBatch::Clear()
168
168
size_estimate = 0 ;
169
169
}
170
170
171
- void CDBBatch::WriteImpl (Span<const std::byte> ssKey , CDataStream& ssValue)
171
+ void CDBBatch::WriteImpl (Span<const std::byte> key , CDataStream& ssValue)
172
172
{
173
- leveldb::Slice slKey (CharCast (ssKey .data ()), ssKey .size ());
173
+ leveldb::Slice slKey (CharCast (key .data ()), key .size ());
174
174
ssValue.Xor (dbwrapper_private::GetObfuscateKey (parent));
175
175
leveldb::Slice slValue (CharCast (ssValue.data ()), ssValue.size ());
176
176
m_impl_batch->batch .Put (slKey, slValue);
@@ -184,9 +184,9 @@ void CDBBatch::WriteImpl(Span<const std::byte> ssKey, CDataStream& ssValue)
184
184
size_estimate += 3 + (slKey.size () > 127 ) + slKey.size () + (slValue.size () > 127 ) + slValue.size ();
185
185
}
186
186
187
- void CDBBatch::EraseImpl (Span<const std::byte> ssKey )
187
+ void CDBBatch::EraseImpl (Span<const std::byte> key )
188
188
{
189
- leveldb::Slice slKey (CharCast (ssKey .data ()), ssKey .size ());
189
+ leveldb::Slice slKey (CharCast (key .data ()), key .size ());
190
190
m_impl_batch->batch .Delete (slKey);
191
191
// LevelDB serializes erases as:
192
192
// - byte: header
@@ -336,9 +336,9 @@ std::vector<unsigned char> CDBWrapper::CreateObfuscateKey() const
336
336
return ret;
337
337
}
338
338
339
- std::optional<std::string> CDBWrapper::ReadImpl (Span<const std::byte> ssKey ) const
339
+ std::optional<std::string> CDBWrapper::ReadImpl (Span<const std::byte> key ) const
340
340
{
341
- leveldb::Slice slKey (CharCast (ssKey .data ()), ssKey .size ());
341
+ leveldb::Slice slKey (CharCast (key .data ()), key .size ());
342
342
std::string strValue;
343
343
leveldb::Status status = DBContext ().pdb ->Get (DBContext ().readoptions , slKey, &strValue);
344
344
if (!status.ok ()) {
@@ -350,9 +350,9 @@ std::optional<std::string> CDBWrapper::ReadImpl(Span<const std::byte> ssKey) con
350
350
return strValue;
351
351
}
352
352
353
- bool CDBWrapper::ExistsImpl (Span<const std::byte> ssKey ) const
353
+ bool CDBWrapper::ExistsImpl (Span<const std::byte> key ) const
354
354
{
355
- leveldb::Slice slKey (CharCast (ssKey .data ()), ssKey .size ());
355
+ leveldb::Slice slKey (CharCast (key .data ()), key .size ());
356
356
357
357
std::string strValue;
358
358
leveldb::Status status = DBContext ().pdb ->Get (DBContext ().readoptions , slKey, &strValue);
@@ -365,10 +365,10 @@ bool CDBWrapper::ExistsImpl(Span<const std::byte> ssKey) const
365
365
return true ;
366
366
}
367
367
368
- size_t CDBWrapper::EstimateSizeImpl (Span<const std::byte> ssKey1 , Span<const std::byte> ssKey2 ) const
368
+ size_t CDBWrapper::EstimateSizeImpl (Span<const std::byte> key1 , Span<const std::byte> key2 ) const
369
369
{
370
- leveldb::Slice slKey1 (CharCast (ssKey1 .data ()), ssKey1 .size ());
371
- leveldb::Slice slKey2 (CharCast (ssKey2 .data ()), ssKey2 .size ());
370
+ leveldb::Slice slKey1 (CharCast (key1 .data ()), key1 .size ());
371
+ leveldb::Slice slKey2 (CharCast (key2 .data ()), key2 .size ());
372
372
uint64_t size = 0 ;
373
373
leveldb::Range range (slKey1, slKey2);
374
374
DBContext ().pdb ->GetApproximateSizes (&range, 1 , &size);
@@ -396,9 +396,9 @@ CDBIterator* CDBWrapper::NewIterator()
396
396
return new CDBIterator{*this , std::make_unique<CDBIterator::IteratorImpl>(DBContext ().pdb ->NewIterator (DBContext ().iteroptions ))};
397
397
}
398
398
399
- void CDBIterator::SeekImpl (Span<const std::byte> ssKey )
399
+ void CDBIterator::SeekImpl (Span<const std::byte> key )
400
400
{
401
- leveldb::Slice slKey (CharCast (ssKey .data ()), ssKey .size ());
401
+ leveldb::Slice slKey (CharCast (key .data ()), key .size ());
402
402
m_impl_iter->iter ->Seek (slKey);
403
403
}
404
404
0 commit comments