mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-05 09:46:53 +00:00
Fixed a compile error in util/options_builder.cc
Summary:
Fixed the following compile error by replacing pow by shift, as it computes
power of 2.
util/options_builder.cc:133:14: error: no member named 'pow' in namespace 'std'
std::pow(2, std::max(0, std::min(3, level0_stop_writes_trigger -
~~~~~^
1 error generated.
make: *** [util/options_builder.o] Error 1
Test Plan: make success in mac and linux
Reviewers: ljin, igor, sdong
Reviewed By: sdong
Subscribers: leveldb
Differential Revision: https://reviews.facebook.net/D20475
This commit is contained in:
@@ -130,8 +130,8 @@ void OptimizeForLevel(int read_amplification_threshold,
|
||||
|
||||
// Try to enlarge the buffer up to 1GB, if still have sufficient headroom.
|
||||
file_num_buffer *=
|
||||
std::pow(2, std::max(0, std::min(3, level0_stop_writes_trigger -
|
||||
file_num_buffer - 2)));
|
||||
1 << std::max(0, std::min(3, level0_stop_writes_trigger -
|
||||
file_num_buffer - 2));
|
||||
|
||||
options->level0_stop_writes_trigger = level0_stop_writes_trigger;
|
||||
options->level0_slowdown_writes_trigger = level0_stop_writes_trigger - 2;
|
||||
|
||||
Reference in New Issue
Block a user