Quellcode durchsuchen

change const to constexpr

PiperOrigin-RevId: 307113877
main
leveldb Team vor 4 Jahren
committed von Victor Costan
Ursprung
Commit
98a3b8cf65
2 geänderte Dateien mit 2 neuen und 3 gelöschten Zeilen
  1. +1
    -2
      db/skiplist_test.cc
  2. +1
    -1
      util/cache_test.cc

+ 1
- 2
db/skiplist_test.cc Datei anzeigen

@ -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; }
@ -280,7 +280,6 @@ class ConcurrentTest {
}
}
};
const uint32_t ConcurrentTest::K;
// Simple test that does single-threaded testing of the ConcurrentTest
// scaffolding.

+ 1
- 1
util/cache_test.cc Datei anzeigen

@ -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_;

Laden…
Abbrechen
Speichern