summaryrefslogtreecommitdiff
path: root/src/modules/extra
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2017-11-21 13:05:17 +0000
committerPeter Powell <petpow@saberuk.com>2017-11-21 15:51:45 +0000
commit91e0af0fc4889f20d2f63426f8fe379674fc0393 (patch)
treed3e39ed4c011b42054994e48a289eee51db9d879 /src/modules/extra
parent3013a9dfbf0c8c980dd59183c38a702e8179ee13 (diff)
Add the override keyword in places that it is missing.
GCCs warnings for this are much better than Clangs.
Diffstat (limited to 'src/modules/extra')
-rw-r--r--src/modules/extra/m_mysql.cpp16
-rw-r--r--src/modules/extra/m_pgsql.cpp8
-rw-r--r--src/modules/extra/m_sqlite3.cpp12
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp2
4 files changed, 19 insertions, 19 deletions
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<std::string>& result)
+ void GetCols(std::vector<std::string>& 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<std::string>& result)
+ void GetCols(std::vector<std::string>& 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<std::string>& result)
+ void GetCols(std::vector<std::string>& 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<void, char*, size_t>
{
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);