summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcmumford <cmumford@google.com>2015-07-22 10:20:21 -0700
committerChris Mumford <cmumford@chromium.org>2015-10-13 14:06:08 -0700
commit1a9648e1f55be762042263df5dc7cb6388702e25 (patch)
tree0d39822ebf12fc7bf55c068c6bebdc1fb86dde1b
parentf79f4180cc29ba891a8ebf46d3766493199d762b (diff)
downloadleveldb-reuse-manifest.tar.gz
Only compiling TrimSpace on linux.reuse-manifest
Incorporated change by zmodem at https://github.com/google/leveldb/pull/310 to fix issue #310. This change will only build TrimSace on linux to avoid unused function warning/error. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=105323419
-rw-r--r--db/db_bench.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/db/db_bench.cc b/db/db_bench.cc
index 691fd28..7a0f5e0 100644
--- a/db/db_bench.cc
+++ b/db/db_bench.cc
@@ -142,6 +142,7 @@ class RandomGenerator {
}
};
+#if defined(__linux)
static Slice TrimSpace(Slice s) {
size_t start = 0;
while (start < s.size() && isspace(s[start])) {
@@ -153,6 +154,7 @@ static Slice TrimSpace(Slice s) {
}
return Slice(s.data() + start, limit - start);
}
+#endif
static void AppendWithSpace(std::string* str, Slice msg) {
if (msg.empty()) return;