aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/db/db_bench.cc
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2013-12-12 22:08:18 +0100
committerPieter Wuille <pieter.wuille@gmail.com>2013-12-12 22:08:18 +0100
commited873a301eeff8c021ba57c78fb702fd2b6f0452 (patch)
tree3fb5bcb91b8ceab464a50e63b6fce407eccb17e2 /src/leveldb/db/db_bench.cc
parentfb34be6d5905d36a2d9a392d87aa73bdb9470a1b (diff)
parent55c68902946c8c9bacea748c159be456a7c9c180 (diff)
Merge src/leveldb changes for LevelDB 1.15
Diffstat (limited to 'src/leveldb/db/db_bench.cc')
-rw-r--r--src/leveldb/db/db_bench.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/leveldb/db/db_bench.cc b/src/leveldb/db/db_bench.cc
index 7abdf87587..fc46d89693 100644
--- a/src/leveldb/db/db_bench.cc
+++ b/src/leveldb/db/db_bench.cc
@@ -128,7 +128,7 @@ class RandomGenerator {
pos_ = 0;
}
- Slice Generate(int len) {
+ Slice Generate(size_t len) {
if (pos_ + len > data_.size()) {
pos_ = 0;
assert(len < data_.size());
@@ -139,11 +139,11 @@ class RandomGenerator {
};
static Slice TrimSpace(Slice s) {
- int start = 0;
+ size_t start = 0;
while (start < s.size() && isspace(s[start])) {
start++;
}
- int limit = s.size();
+ size_t limit = s.size();
while (limit > start && isspace(s[limit-1])) {
limit--;
}
@@ -399,7 +399,7 @@ class Benchmark {
heap_counter_(0) {
std::vector<std::string> files;
Env::Default()->GetChildren(FLAGS_db, &files);
- for (int i = 0; i < files.size(); i++) {
+ for (size_t i = 0; i < files.size(); i++) {
if (Slice(files[i]).starts_with("heap-")) {
Env::Default()->DeleteFile(std::string(FLAGS_db) + "/" + files[i]);
}