From 56ca8338e5a86e92eb604ac5171528dd3aa78da3 Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Tue, 11 Mar 2014 13:08:48 -0700 Subject: [PATCH] initialize static const outside of class --- tools/db_stress.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/db_stress.cc b/tools/db_stress.cc index 7fc9bb339..db4cec480 100644 --- a/tools/db_stress.cc +++ b/tools/db_stress.cc @@ -521,7 +521,7 @@ class Stats { // State shared by all concurrent executions of the same benchmark. class SharedState { public: - static const uint32_t SENTINEL = 0xffffffff; + static const uint32_t SENTINEL; explicit SharedState(StressTest* stress_test) : cv_(&mu_), @@ -676,6 +676,8 @@ class SharedState { std::vector> key_locks_; }; +const uint32_t SharedState::SENTINEL = 0xffffffff; + // Per-thread state for concurrent executions of the same benchmark. struct ThreadState { uint32_t tid; // 0..n-1