From 91e0af0fc4889f20d2f63426f8fe379674fc0393 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Tue, 21 Nov 2017 13:05:17 +0000 Subject: Add the override keyword in places that it is missing. GCCs warnings for this are much better than Clangs. --- src/modules/extra/m_mysql.cpp | 16 ++++++++-------- src/modules/extra/m_pgsql.cpp | 8 ++++---- src/modules/extra/m_sqlite3.cpp | 12 ++++++------ src/modules/extra/m_ssl_gnutls.cpp | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) (limited to 'src/modules/extra') diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index 3490f7fa6..aa396d55f 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -126,8 +126,8 @@ class DispatcherThread : public SocketThread public: DispatcherThread(ModuleSQL* CreatorModule) : Parent(CreatorModule) { } ~DispatcherThread() { } - void Run(); - void OnNotify(); + void Run() CXX11_OVERRIDE; + void OnNotify() CXX11_OVERRIDE; }; #if !defined(MYSQL_VERSION_ID) || MYSQL_VERSION_ID<32224 @@ -193,12 +193,12 @@ class MySQLresult : public SQLResult } - int Rows() + int Rows() CXX11_OVERRIDE { return rows; } - void GetCols(std::vector& result) + void GetCols(std::vector& result) CXX11_OVERRIDE { result.assign(colnames.begin(), colnames.end()); } @@ -212,7 +212,7 @@ class MySQLresult : public SQLResult return SQLEntry(); } - bool GetRow(SQLEntries& result) + bool GetRow(SQLEntries& result) CXX11_OVERRIDE { if (currentrow < rows) { @@ -319,14 +319,14 @@ class SQLConnection : public SQLProvider mysql_close(connection); } - void submit(SQLQuery* q, const std::string& qs) + void submit(SQLQuery* q, const std::string& qs) CXX11_OVERRIDE { Parent()->Dispatcher->LockQueue(); Parent()->qq.push_back(QQueueItem(q, qs, this)); Parent()->Dispatcher->UnlockQueueWakeup(); } - void submit(SQLQuery* call, const std::string& q, const ParamL& p) + void submit(SQLQuery* call, const std::string& q, const ParamL& p) CXX11_OVERRIDE { std::string res; unsigned int param = 0; @@ -354,7 +354,7 @@ class SQLConnection : public SQLProvider submit(call, res); } - void submit(SQLQuery* call, const std::string& q, const ParamM& p) + void submit(SQLQuery* call, const std::string& q, const ParamM& p) CXX11_OVERRIDE { std::string res; for(std::string::size_type i = 0; i < q.length(); i++) diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 09aba7de9..7aaf96a67 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -65,7 +65,7 @@ class ReconnectTimer : public Timer ReconnectTimer(ModulePgSQL* m) : Timer(5, false), mod(m) { } - bool Tick(time_t TIME); + bool Tick(time_t TIME) CXX11_OVERRIDE; }; struct QueueItem @@ -100,12 +100,12 @@ class PgSQLresult : public SQLResult PQclear(res); } - int Rows() + int Rows() CXX11_OVERRIDE { return rows; } - void GetCols(std::vector& result) + void GetCols(std::vector& result) CXX11_OVERRIDE { result.resize(PQnfields(res)); for(unsigned int i=0; i < result.size(); i++) @@ -123,7 +123,7 @@ class PgSQLresult : public SQLResult return SQLEntry(std::string(v, PQgetlength(res, row, column))); } - bool GetRow(SQLEntries& result) + bool GetRow(SQLEntries& result) CXX11_OVERRIDE { if (currentrow >= PQntuples(res)) return false; diff --git a/src/modules/extra/m_sqlite3.cpp b/src/modules/extra/m_sqlite3.cpp index c7af2c23a..5f6cd1ce3 100644 --- a/src/modules/extra/m_sqlite3.cpp +++ b/src/modules/extra/m_sqlite3.cpp @@ -58,12 +58,12 @@ class SQLite3Result : public SQLResult { } - int Rows() + int Rows() CXX11_OVERRIDE { return rows; } - bool GetRow(SQLEntries& result) + bool GetRow(SQLEntries& result) CXX11_OVERRIDE { if (currentrow < rows) { @@ -78,7 +78,7 @@ class SQLite3Result : public SQLResult } } - void GetCols(std::vector& result) + void GetCols(std::vector& result) CXX11_OVERRIDE { result.assign(columns.begin(), columns.end()); } @@ -159,13 +159,13 @@ class SQLConn : public SQLProvider sqlite3_finalize(stmt); } - void submit(SQLQuery* query, const std::string& q) + void submit(SQLQuery* query, const std::string& q) CXX11_OVERRIDE { Query(query, q); delete query; } - void submit(SQLQuery* query, const std::string& q, const ParamL& p) + void submit(SQLQuery* query, const std::string& q, const ParamL& p) CXX11_OVERRIDE { std::string res; unsigned int param = 0; @@ -186,7 +186,7 @@ class SQLConn : public SQLProvider submit(query, res); } - void submit(SQLQuery* query, const std::string& q, const ParamM& p) + void submit(SQLQuery* query, const std::string& q, const ParamM& p) CXX11_OVERRIDE { std::string res; for(std::string::size_type i = 0; i < q.length(); i++) diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp index 534c3abbc..2d278c967 100644 --- a/src/modules/extra/m_ssl_gnutls.cpp +++ b/src/modules/extra/m_ssl_gnutls.cpp @@ -115,7 +115,7 @@ static Module* thismod; class RandGen : public HandlerBase2 { public: - void Call(char* buffer, size_t len) + void Call(char* buffer, size_t len) CXX11_OVERRIDE { #ifdef GNUTLS_HAS_RND gnutls_rnd(GNUTLS_RND_RANDOM, buffer, len); -- cgit v1.2.3