From 8f4e1c1c9a9c7f433df9978fc73aeb8224a45263 Mon Sep 17 00:00:00 2001 From: Yueh-Hsuan Chiang Date: Thu, 4 Dec 2014 13:54:07 -0800 Subject: [PATCH] Remove the compability check on log2 OS_ANDROID as it's already blocked by ROCKSDB_LITE Summary: Remove the compability check on log2 OS_ANDROID as it's already blocked by ROCKSDB_LITE Test Plan: make OPT="-DROCKSDB_LITE -DOS_ANDROID" shared_lib -j32 make shared_lib -j32 --- util/options_builder.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/util/options_builder.cc b/util/options_builder.cc index d473ca943..3ac3debd7 100644 --- a/util/options_builder.cc +++ b/util/options_builder.cc @@ -11,14 +11,6 @@ namespace rocksdb { namespace { -inline double Log2(double n) { -#ifndef OS_ANDROID - return log2(n); -#else - return log(n) / log(2); -#endif -} - // For now, always use 1-0 as level bytes multiplier. const int kBytesForLevelMultiplier = 10; const size_t kBytesForOneMb = 1024 * 1024; @@ -37,7 +29,7 @@ CompactionStyle PickCompactionStyle(size_t write_buffer_size, ::log(target_db_size / write_buffer_size) / ::log(kBytesForLevelMultiplier))); int expected_max_files_universal = - static_cast(ceil(Log2(target_db_size / write_buffer_size))); + static_cast(ceil(log2(target_db_size / write_buffer_size))); const int kEstimatedLevel0FilesInLevelStyle = 2; // Estimate write amplification: