summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-12-29 05:01:53 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-12-29 06:00:07 +0000
commitdbb9af54381e9d62e5ac958965f4acbc6c154ac1 (patch)
treef0806a358b2978433c0a74ddf6bcd077428e9c85
parentNon-const insertId (diff)
downloadlibdbpp-dbb9af54381e9d62e5ac958965f4acbc6c154ac1.tar.bz2
libdbpp-dbb9af54381e9d62e5ac958965f4acbc6c154ac1.tar.xz
libdbpp-dbb9af54381e9d62e5ac958965f4acbc6c154ac1.zip
Add missing override attribute
-rw-r--r--libdbpp/unittests/testConnection.cpp16
-rw-r--r--libdbpp/unittests/testPatch.cpp10
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);
}