kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ale...@apache.org
Subject [kudu] 01/02: [transactions] fix compilation warning in tests
Date Fri, 20 Sep 2019 19:54:49 GMT
This is an automated email from the ASF dual-hosted git repository.

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit 0e39aae7ee09559a37774a53e84a37a89a9b22ce
Author: Alexey Serbin <alexey@apache.org>
AuthorDate: Thu Sep 19 16:26:31 2019 -0700

    [transactions] fix compilation warning in tests
    
    Fixed compilation warning in transaction_tracker-test.cc:
    
    src/kudu/tablet/transactions/transaction_tracker-test.cc:83:37: \
        warning: 'state' overrides a member function \
        but is not marked 'override'
    
    I also modernized a bit the code around:
      'OVERRIDE' macro --> 'override' keyword
    
    This patch does not contain any functional changes.
    
    Change-Id: Ie838d6f9ac06b7be94198e33e510fa14bfcf2e13
    Reviewed-on: http://gerrit.cloudera.org:8080/14268
    Tested-by: Kudu Jenkins
    Reviewed-by: Adar Dembo <adar@cloudera.com>
---
 .../transactions/transaction_tracker-test.cc       | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/kudu/tablet/transactions/transaction_tracker-test.cc b/src/kudu/tablet/transactions/transaction_tracker-test.cc
index 0b48d52..1552a1b 100644
--- a/src/kudu/tablet/transactions/transaction_tracker-test.cc
+++ b/src/kudu/tablet/transactions/transaction_tracker-test.cc
@@ -15,6 +15,8 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include "kudu/tablet/transactions/transaction_tracker.h"
+
 #include <cstdint>
 #include <memory>
 #include <ostream>
@@ -29,11 +31,9 @@
 #include "kudu/consensus/consensus.pb.h"
 #include "kudu/gutil/casts.h"
 #include "kudu/gutil/gscoped_ptr.h"
-#include "kudu/gutil/port.h"
 #include "kudu/gutil/ref_counted.h"
 #include "kudu/tablet/transactions/transaction.h"
 #include "kudu/tablet/transactions/transaction_driver.h"
-#include "kudu/tablet/transactions/transaction_tracker.h"
 #include "kudu/util/countdown_latch.h"
 #include "kudu/util/mem_tracker.h"
 #include "kudu/util/metrics.h"
@@ -64,8 +64,8 @@ class TransactionTrackerTest : public KuduTest {
   class NoOpTransactionState : public TransactionState {
    public:
     NoOpTransactionState() : TransactionState(nullptr) {}
-    virtual const google::protobuf::Message* request() const OVERRIDE { return &req_;
}
-    virtual std::string ToString() const OVERRIDE { return "NoOpTransactionState"; }
+    const google::protobuf::Message* request() const override { return &req_; }
+    std::string ToString() const override { return "NoOpTransactionState"; }
    private:
     consensus::ReplicateMsg req_;
   };
@@ -76,18 +76,18 @@ class TransactionTrackerTest : public KuduTest {
         state_(state) {
     }
 
-    virtual void NewReplicateMsg(gscoped_ptr<consensus::ReplicateMsg>* replicate_msg)
OVERRIDE {
+    void NewReplicateMsg(gscoped_ptr<consensus::ReplicateMsg>* replicate_msg) override
{
       replicate_msg->reset(new consensus::ReplicateMsg());
     }
-    virtual TransactionState* state() { return state_.get();  }
-    virtual const TransactionState* state() const { return state_.get();  }
+    TransactionState* state() override { return state_.get();  }
+    const TransactionState* state() const override { return state_.get();  }
 
-    virtual Status Prepare() OVERRIDE { return Status::OK(); }
-    virtual Status Start() OVERRIDE { return Status::OK(); }
-    virtual Status Apply(gscoped_ptr<consensus::CommitMsg>* commit_msg) OVERRIDE {
+    Status Prepare() override { return Status::OK(); }
+    Status Start() override { return Status::OK(); }
+    Status Apply(gscoped_ptr<consensus::CommitMsg>* /* commit_msg */) override {
       return Status::OK();
     }
-    virtual std::string ToString() const OVERRIDE {
+    std::string ToString() const override {
       return "NoOp";
     }
    private:


Mime
View raw message