mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
@20776309
* env_chromium.cc should not export symbols. * Fix MSVC warnings. * Removed large value support. * Fix broken reference to documentation file git-svn-id: https://leveldb.googlecode.com/svn/trunk@24 62dab493-f737-651d-591e-8d6aee1b9529
This commit is contained in:
@@ -16,7 +16,7 @@ Arena::Arena() {
|
||||
}
|
||||
|
||||
Arena::~Arena() {
|
||||
for (int i = 0; i < blocks_.size(); i++) {
|
||||
for (size_t i = 0; i < blocks_.size(); i++) {
|
||||
delete[] blocks_[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ char* EncodeVarint64(char* dst, uint64_t v) {
|
||||
*(ptr++) = (v & (B-1)) | B;
|
||||
v >>= 7;
|
||||
}
|
||||
*(ptr++) = v;
|
||||
*(ptr++) = static_cast<unsigned char>(v);
|
||||
return reinterpret_cast<char*>(ptr);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class BytewiseComparatorImpl : public Comparator {
|
||||
virtual void FindShortSuccessor(std::string* key) const {
|
||||
// Find first character that can be incremented
|
||||
size_t n = key->size();
|
||||
for (int i = 0; i < n; i++) {
|
||||
for (size_t i = 0; i < n; i++) {
|
||||
const uint8_t byte = (*key)[i];
|
||||
if (byte != static_cast<uint8_t>(0xff)) {
|
||||
(*key)[i] = byte + 1;
|
||||
|
||||
@@ -20,7 +20,7 @@ void AppendNumberTo(std::string* str, uint64_t num) {
|
||||
}
|
||||
|
||||
void AppendEscapedStringTo(std::string* str, const Slice& value) {
|
||||
for (int i = 0; i < value.size(); i++) {
|
||||
for (size_t i = 0; i < value.size(); i++) {
|
||||
char c = value[i];
|
||||
if (c >= ' ' && c <= '~') {
|
||||
str->push_back(c);
|
||||
|
||||
@@ -18,7 +18,6 @@ Options::Options()
|
||||
info_log(NULL),
|
||||
write_buffer_size(4<<20),
|
||||
max_open_files(1000),
|
||||
large_value_threshold(65536),
|
||||
block_cache(NULL),
|
||||
block_size(4096),
|
||||
block_restart_interval(16),
|
||||
|
||||
@@ -29,7 +29,7 @@ class Random {
|
||||
uint64_t product = seed_ * A;
|
||||
|
||||
// Compute (product % M) using the fact that ((x << 31) % M) == x.
|
||||
seed_ = (product >> 31) + (product & M);
|
||||
seed_ = static_cast<uint32_t>((product >> 31) + (product & M));
|
||||
// The first reduction may overflow by 1 bit, so we may need to
|
||||
// repeat. mod == M is not possible; using > allows the faster
|
||||
// sign-bit-based test.
|
||||
|
||||
Reference in New Issue
Block a user