From 1998c0ef15f0fb64994e165230473337f041fd8c Mon Sep 17 00:00:00 2001 From: Victor Costan Date: Tue, 12 Jan 2021 21:54:35 +0000 Subject: [PATCH] Fix build errors. PiperOrigin-RevId: 351442409 --- benchmarks/db_bench.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmarks/db_bench.cc b/benchmarks/db_bench.cc index 7c474d8..b362569 100644 --- a/benchmarks/db_bench.cc +++ b/benchmarks/db_bench.cc @@ -130,7 +130,7 @@ class CountComparator : public Comparator { public: CountComparator(const Comparator* wrapped) : wrapped_(wrapped) {} ~CountComparator() override {} - int Compare(const Slice& a, const Slice& b) const { + int Compare(const Slice& a, const Slice& b) const override { count_.fetch_add(1, std::memory_order_relaxed); return wrapped_->Compare(a, b); } @@ -149,7 +149,7 @@ class CountComparator : public Comparator { void reset() { count_.store(0, std::memory_order_relaxed); } private: - mutable std::atomic count_ = 0; + mutable std::atomic count_{0}; const Comparator* const wrapped_; };