Skip to content

Commit

Permalink
change const to constexpr
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 307113877
  • Loading branch information
leveldb Team authored and pwnall committed Apr 28, 2020
1 parent 201f522 commit 98a3b8c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions db/skiplist_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ TEST(SkipTest, InsertAndLookup) {
// been concurrently added since the iterator started.
class ConcurrentTest {
private:
static const uint32_t K = 4;
static constexpr uint32_t K = 4;

static uint64_t key(Key key) { return (key >> 40); }
static uint64_t gen(Key key) { return (key >> 8) & 0xffffffffu; }
Expand Down Expand Up @@ -280,7 +280,6 @@ class ConcurrentTest {
}
}
};
const uint32_t ConcurrentTest::K;

// Simple test that does single-threaded testing of the ConcurrentTest
// scaffolding.
Expand Down
2 changes: 1 addition & 1 deletion util/cache_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CacheTest : public testing::Test {
current_->deleted_values_.push_back(DecodeValue(v));
}

static const int kCacheSize = 1000;
static constexpr int kCacheSize = 1000;
std::vector<int> deleted_keys_;
std::vector<int> deleted_values_;
Cache* cache_;
Expand Down

0 comments on commit 98a3b8c

Please sign in to comment.