initialize static const outside of class

main
Igor Canadi 11 years ago
parent d833f15738
commit 56ca8338e5
  1. 4
      tools/db_stress.cc

@ -521,7 +521,7 @@ class Stats {
// State shared by all concurrent executions of the same benchmark. // State shared by all concurrent executions of the same benchmark.
class SharedState { class SharedState {
public: public:
static const uint32_t SENTINEL = 0xffffffff; static const uint32_t SENTINEL;
explicit SharedState(StressTest* stress_test) : explicit SharedState(StressTest* stress_test) :
cv_(&mu_), cv_(&mu_),
@ -676,6 +676,8 @@ class SharedState {
std::vector<std::vector<port::Mutex>> key_locks_; std::vector<std::vector<port::Mutex>> key_locks_;
}; };
const uint32_t SharedState::SENTINEL = 0xffffffff;
// Per-thread state for concurrent executions of the same benchmark. // Per-thread state for concurrent executions of the same benchmark.
struct ThreadState { struct ThreadState {
uint32_t tid; // 0..n-1 uint32_t tid; // 0..n-1

Loading…
Cancel
Save