From 147dfc7bdfca8a5ca544097d08460e045aed89f8 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Thu, 5 Apr 2018 11:05:11 -0700 Subject: [PATCH] Fix pre_release callback argument list. Summary: Primitive types constness does not affect the signature of the method and has no influence on whether the overriding method would actually have that const bool instead of just bool. In addition, it is rarely useful but does produce a compatibility warnings in VS 2015 compiler. Closes https://github.com/facebook/rocksdb/pull/3663 Differential Revision: D7475739 Pulled By: ajkr fbshipit-source-id: fb275378b5acc397399420ae6abb4b6bfe5bd32f --- db/pre_release_callback.h | 2 +- db/write_callback_test.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/pre_release_callback.h b/db/pre_release_callback.h index b3e658577..0cee4d547 100644 --- a/db/pre_release_callback.h +++ b/db/pre_release_callback.h @@ -26,7 +26,7 @@ class PreReleaseCallback { // released. // is_mem_disabled is currently used for debugging purposes to assert that // the callback is done from the right write queue. - virtual Status Callback(SequenceNumber seq, const bool is_mem_disabled) = 0; + virtual Status Callback(SequenceNumber seq, bool is_mem_disabled) = 0; }; } // namespace rocksdb diff --git a/db/write_callback_test.cc b/db/write_callback_test.cc index c91a4305c..a1b7f6541 100644 --- a/db/write_callback_test.cc +++ b/db/write_callback_test.cc @@ -295,7 +295,7 @@ TEST_F(WriteCallbackTest, WriteWithCallbackTest) { PublishSeqCallback(DBImpl* db_impl_in) : db_impl_(db_impl_in) {} virtual Status Callback(SequenceNumber last_seq, - const bool /*not used*/) override { + bool /*not used*/) override { db_impl_->SetLastPublishedSequence(last_seq); return Status::OK(); }