From dbb9af54381e9d62e5ac958965f4acbc6c154ac1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 29 Dec 2015 05:01:53 +0000 Subject: Add missing override attribute --- libdbpp/unittests/testConnection.cpp | 16 ++++++++-------- libdbpp/unittests/testPatch.cpp | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/libdbpp/unittests/testConnection.cpp b/libdbpp/unittests/testConnection.cpp index c87121a..42cecfd 100644 --- a/libdbpp/unittests/testConnection.cpp +++ b/libdbpp/unittests/testConnection.cpp @@ -14,14 +14,14 @@ class MockDb : public DB::Connection { public: MockDb(const std::string &) : txDepth(0) {} - void finish() const {} - int beginTx() const { return ++txDepth; } - int commitTx() const { return --txDepth; } - int rollbackTx() const { return --txDepth; } - bool inTx() const { return txDepth > 0; } - void ping() const {} - DB::BulkDeleteStyle bulkDeleteStyle() const { return DB::BulkDeleteUsingUsing; } - DB::BulkUpdateStyle bulkUpdateStyle() const { return DB::BulkUpdateUsingJoin; } + void finish() const override {} + int beginTx() const override { return ++txDepth; } + int commitTx() const override { return --txDepth; } + int rollbackTx() const override { return --txDepth; } + bool inTx() const override { return txDepth > 0; } + void ping() const override {} + DB::BulkDeleteStyle bulkDeleteStyle() const override { return DB::BulkDeleteUsingUsing; } + DB::BulkUpdateStyle bulkUpdateStyle() const override { return DB::BulkUpdateUsingJoin; } void execute(const std::string & sql) override { executed.push_back(sql); diff --git a/libdbpp/unittests/testPatch.cpp b/libdbpp/unittests/testPatch.cpp index 2b44d07..6cf2d5d 100644 --- a/libdbpp/unittests/testPatch.cpp +++ b/libdbpp/unittests/testPatch.cpp @@ -19,7 +19,7 @@ class Mock : public PQ::Mock { class OrderByA : public DB::SqlWriter { public: - void writeSql(AdHoc::Buffer & b) + void writeSql(AdHoc::Buffer & b) override { b.append("a"); } @@ -27,11 +27,11 @@ class OrderByA : public DB::SqlWriter { class WhereAequals1 : public DB::SqlWriter { public: - void writeSql(AdHoc::Buffer & b) + void writeSql(AdHoc::Buffer & b) override { b.append("a.a = ?"); } - void bindParams(DB::Command * cmd, unsigned int & o) + void bindParams(DB::Command * cmd, unsigned int & o) override { cmd->bindParamI(o++, 1); } @@ -39,11 +39,11 @@ class WhereAequals1 : public DB::SqlWriter { class MarkDeleted : public DB::SqlWriter { public: - void writeSql(AdHoc::Buffer & b) + void writeSql(AdHoc::Buffer & b) override { b.append("deleted = ?"); } - void bindParams(DB::Command * cmd, unsigned int & o) + void bindParams(DB::Command * cmd, unsigned int & o) override { cmd->bindParamB(o++, true); } -- cgit v1.2.3