summaryrefslogtreecommitdiff
path: root/modules/database
diff options
context:
space:
mode:
Diffstat (limited to 'modules/database')
-rw-r--r--modules/database/db_flatfile.cpp20
-rw-r--r--modules/database/db_old.cpp4
-rw-r--r--modules/database/db_redis.cpp34
-rw-r--r--modules/database/db_sql.cpp26
-rw-r--r--modules/database/db_sql_live.cpp18
5 files changed, 51 insertions, 51 deletions
diff --git a/modules/database/db_flatfile.cpp b/modules/database/db_flatfile.cpp
index 694ff69a4..c4b2254c8 100644
--- a/modules/database/db_flatfile.cpp
+++ b/modules/database/db_flatfile.cpp
@@ -22,7 +22,7 @@ class SaveData : public Serialize::Data
SaveData() : fs(NULL) { }
- std::iostream& operator[](const Anope::string &key) anope_override
+ std::iostream& operator[](const Anope::string &key) override
{
if (key != last)
{
@@ -45,7 +45,7 @@ class LoadData : public Serialize::Data
LoadData() : fs(NULL), id(0), read(false) { }
- std::iostream& operator[](const Anope::string &key) anope_override
+ std::iostream& operator[](const Anope::string &key) override
{
if (!read)
{
@@ -77,7 +77,7 @@ class LoadData : public Serialize::Data
return this->ss;
}
- std::set<Anope::string> KeySet() const anope_override
+ std::set<Anope::string> KeySet() const override
{
std::set<Anope::string> keys;
for (std::map<Anope::string, Anope::string>::const_iterator it = this->data.begin(), it_end = this->data.end(); it != it_end; ++it)
@@ -85,7 +85,7 @@ class LoadData : public Serialize::Data
return keys;
}
- size_t Hash() const anope_override
+ size_t Hash() const override
{
size_t hash = 0;
for (std::map<Anope::string, Anope::string>::const_iterator it = this->data.begin(), it_end = this->data.end(); it != it_end; ++it)
@@ -173,12 +173,12 @@ class DBFlatFile : public Module, public Pipe
}
#ifndef _WIN32
- void OnRestart() anope_override
+ void OnRestart() override
{
OnShutdown();
}
- void OnShutdown() anope_override
+ void OnShutdown() override
{
if (child_pid > -1)
{
@@ -192,7 +192,7 @@ class DBFlatFile : public Module, public Pipe
}
#endif
- void OnNotify() anope_override
+ void OnNotify() override
{
char buf[512];
int i = this->Read(buf, sizeof(buf) - 1);
@@ -214,7 +214,7 @@ class DBFlatFile : public Module, public Pipe
Anope::Quitting = true;
}
- EventReturn OnLoadDatabase() anope_override
+ EventReturn OnLoadDatabase() override
{
const std::vector<Anope::string> &type_order = Serialize::Type::GetTypeOrder();
std::set<Anope::string> tried_dbs;
@@ -264,7 +264,7 @@ class DBFlatFile : public Module, public Pipe
}
- void OnSaveDatabase() anope_override
+ void OnSaveDatabase() override
{
if (child_pid > -1)
{
@@ -371,7 +371,7 @@ class DBFlatFile : public Module, public Pipe
}
/* Load just one type. Done if a module is reloaded during runtime */
- void OnSerializeTypeCreate(Serialize::Type *stype) anope_override
+ void OnSerializeTypeCreate(Serialize::Type *stype) override
{
if (!loaded)
return;
diff --git a/modules/database/db_old.cpp b/modules/database/db_old.cpp
index b49a6c46e..82f26e064 100644
--- a/modules/database/db_old.cpp
+++ b/modules/database/db_old.cpp
@@ -1310,7 +1310,7 @@ class DBOld : public Module
throw ModuleException("Invalid hash method");
}
- EventReturn OnLoadDatabase() anope_override
+ EventReturn OnLoadDatabase() override
{
LoadNicks();
LoadVHosts();
@@ -1323,7 +1323,7 @@ class DBOld : public Module
return EVENT_STOP;
}
- void OnUplinkSync(Server *s) anope_override
+ void OnUplinkSync(Server *s) override
{
for (registered_channel_map::iterator it = RegisteredChannelList->begin(), it_end = RegisteredChannelList->end(); it != it_end; ++it)
{
diff --git a/modules/database/db_redis.cpp b/modules/database/db_redis.cpp
index 3cd023ed6..d7585bc32 100644
--- a/modules/database/db_redis.cpp
+++ b/modules/database/db_redis.cpp
@@ -27,7 +27,7 @@ class Data : public Serialize::Data
delete it->second;
}
- std::iostream& operator[](const Anope::string &key) anope_override
+ std::iostream& operator[](const Anope::string &key) override
{
std::stringstream* &stream = data[key];
if (!stream)
@@ -35,7 +35,7 @@ class Data : public Serialize::Data
return *stream;
}
- std::set<Anope::string> KeySet() const anope_override
+ std::set<Anope::string> KeySet() const override
{
std::set<Anope::string> keys;
for (std::map<Anope::string, std::stringstream *>::const_iterator it = this->data.begin(), it_end = this->data.end(); it != it_end; ++it)
@@ -43,7 +43,7 @@ class Data : public Serialize::Data
return keys;
}
- size_t Hash() const anope_override
+ size_t Hash() const override
{
size_t hash = 0;
for (std::map<Anope::string, std::stringstream *>::const_iterator it = this->data.begin(), it_end = this->data.end(); it != it_end; ++it)
@@ -59,7 +59,7 @@ class TypeLoader : public Interface
public:
TypeLoader(Module *creator, const Anope::string &t) : Interface(creator), type(t) { }
- void OnResult(const Reply &r) anope_override;
+ void OnResult(const Reply &r) override;
};
class ObjectLoader : public Interface
@@ -70,7 +70,7 @@ class ObjectLoader : public Interface
public:
ObjectLoader(Module *creator, const Anope::string &t, int64_t i) : Interface(creator), type(t), id(i) { }
- void OnResult(const Reply &r) anope_override;
+ void OnResult(const Reply &r) override;
};
class IDInterface : public Interface
@@ -79,7 +79,7 @@ class IDInterface : public Interface
public:
IDInterface(Module *creator, Serializable *obj) : Interface(creator), o(obj) { }
- void OnResult(const Reply &r) anope_override;
+ void OnResult(const Reply &r) override;
};
class Deleter : public Interface
@@ -89,7 +89,7 @@ class Deleter : public Interface
public:
Deleter(Module *creator, const Anope::string &t, int64_t i) : Interface(creator), type(t), id(i) { }
- void OnResult(const Reply &r) anope_override;
+ void OnResult(const Reply &r) override;
};
class Updater : public Interface
@@ -99,7 +99,7 @@ class Updater : public Interface
public:
Updater(Module *creator, const Anope::string &t, int64_t i) : Interface(creator), type(t), id(i) { }
- void OnResult(const Reply &r) anope_override;
+ void OnResult(const Reply &r) override;
};
class ModifiedObject : public Interface
@@ -109,7 +109,7 @@ class ModifiedObject : public Interface
public:
ModifiedObject(Module *creator, const Anope::string &t, int64_t i) : Interface(creator), type(t), id(i) { }
- void OnResult(const Reply &r) anope_override;
+ void OnResult(const Reply &r) override;
};
class SubscriptionListener : public Interface
@@ -117,7 +117,7 @@ class SubscriptionListener : public Interface
public:
SubscriptionListener(Module *creator) : Interface(creator) { }
- void OnResult(const Reply &r) anope_override;
+ void OnResult(const Reply &r) override;
};
class DatabaseRedis : public Module, public Pipe
@@ -161,7 +161,7 @@ class DatabaseRedis : public Module, public Pipe
}
}
- void OnNotify() anope_override
+ void OnNotify() override
{
for (std::set<Serializable *>::iterator it = this->updated_items.begin(), it_end = this->updated_items.end(); it != it_end; ++it)
{
@@ -173,13 +173,13 @@ class DatabaseRedis : public Module, public Pipe
this->updated_items.clear();
}
- void OnReload(Configuration::Conf *conf) anope_override
+ void OnReload(Configuration::Conf *conf) override
{
Configuration::Block *block = conf->GetModule(this);
this->redis = ServiceReference<Provider>("Redis::Provider", block->Get<const Anope::string>("engine", "redis/main"));
}
- EventReturn OnLoadDatabase() anope_override
+ EventReturn OnLoadDatabase() override
{
const std::vector<Anope::string> type_order = Serialize::Type::GetTypeOrder();
for (unsigned i = 0; i < type_order.size(); ++i)
@@ -195,7 +195,7 @@ class DatabaseRedis : public Module, public Pipe
return EVENT_STOP;
}
- void OnSerializeTypeCreate(Serialize::Type *sb) anope_override
+ void OnSerializeTypeCreate(Serialize::Type *sb) override
{
if (!redis)
return;
@@ -207,13 +207,13 @@ class DatabaseRedis : public Module, public Pipe
redis->SendCommand(new TypeLoader(this, sb->GetName()), args);
}
- void OnSerializableConstruct(Serializable *obj) anope_override
+ void OnSerializableConstruct(Serializable *obj) override
{
this->updated_items.insert(obj);
this->Notify();
}
- void OnSerializableDestruct(Serializable *obj) anope_override
+ void OnSerializableDestruct(Serializable *obj) override
{
Serialize::Type *t = obj->GetSerializableType();
@@ -229,7 +229,7 @@ class DatabaseRedis : public Module, public Pipe
this->Notify();
}
- void OnSerializableUpdate(Serializable *obj) anope_override
+ void OnSerializableUpdate(Serializable *obj) override
{
this->updated_items.insert(obj);
this->Notify();
diff --git a/modules/database/db_sql.cpp b/modules/database/db_sql.cpp
index b56f884f6..34ae7cfea 100644
--- a/modules/database/db_sql.cpp
+++ b/modules/database/db_sql.cpp
@@ -18,12 +18,12 @@ class SQLSQLInterface : public Interface
public:
SQLSQLInterface(Module *o) : Interface(o) { }
- void OnResult(const Result &r) anope_override
+ void OnResult(const Result &r) override
{
Log(LOG_DEBUG) << "SQL successfully executed query: " << r.finished_query;
}
- void OnError(const Result &r) anope_override
+ void OnError(const Result &r) override
{
if (!r.GetQuery().query.empty())
Log(LOG_DEBUG) << "Error executing query " << r.finished_query << ": " << r.GetError();
@@ -39,7 +39,7 @@ class ResultSQLSQLInterface : public SQLSQLInterface
public:
ResultSQLSQLInterface(Module *o, Serializable *ob) : SQLSQLInterface(o), obj(ob) { }
- void OnResult(const Result &r) anope_override
+ void OnResult(const Result &r) override
{
SQLSQLInterface::OnResult(r);
if (r.GetID() > 0 && this->obj)
@@ -47,7 +47,7 @@ public:
delete this;
}
- void OnError(const Result &r) anope_override
+ void OnError(const Result &r) override
{
SQLSQLInterface::OnError(r);
delete this;
@@ -97,7 +97,7 @@ class DBSQL : public Module, public Pipe
throw ModuleException("db_sql can not be loaded after db_sql_live");
}
- void OnNotify() anope_override
+ void OnNotify() override
{
for (std::set<Serializable *>::iterator it = this->updated_items.begin(), it_end = this->updated_items.end(); it != it_end; ++it)
{
@@ -144,7 +144,7 @@ class DBSQL : public Module, public Pipe
this->imported = true;
}
- void OnReload(Configuration::Conf *conf) anope_override
+ void OnReload(Configuration::Conf *conf) override
{
Configuration::Block *block = conf->GetModule(this);
this->sql = ServiceReference<Provider>("SQL::Provider", block->Get<const Anope::string>("engine"));
@@ -152,18 +152,18 @@ class DBSQL : public Module, public Pipe
this->import = block->Get<bool>("import");
}
- void OnShutdown() anope_override
+ void OnShutdown() override
{
this->shutting_down = true;
this->OnNotify();
}
- void OnRestart() anope_override
+ void OnRestart() override
{
this->OnShutdown();
}
- EventReturn OnLoadDatabase() anope_override
+ EventReturn OnLoadDatabase() override
{
if (!this->sql)
{
@@ -186,7 +186,7 @@ class DBSQL : public Module, public Pipe
return EVENT_STOP;
}
- void OnSerializableConstruct(Serializable *obj) anope_override
+ void OnSerializableConstruct(Serializable *obj) override
{
if (this->shutting_down || this->loading_databases)
return;
@@ -195,7 +195,7 @@ class DBSQL : public Module, public Pipe
this->Notify();
}
- void OnSerializableDestruct(Serializable *obj) anope_override
+ void OnSerializableDestruct(Serializable *obj) override
{
if (this->shutting_down)
return;
@@ -205,7 +205,7 @@ class DBSQL : public Module, public Pipe
this->updated_items.erase(obj);
}
- void OnSerializableUpdate(Serializable *obj) anope_override
+ void OnSerializableUpdate(Serializable *obj) override
{
if (this->shutting_down || obj->IsTSCached())
return;
@@ -214,7 +214,7 @@ class DBSQL : public Module, public Pipe
this->Notify();
}
- void OnSerializeTypeCreate(Serialize::Type *sb) anope_override
+ void OnSerializeTypeCreate(Serialize::Type *sb) override
{
if (!this->loading_databases && !this->loaded)
return;
diff --git a/modules/database/db_sql_live.cpp b/modules/database/db_sql_live.cpp
index b9b8ef57c..0099ff5e2 100644
--- a/modules/database/db_sql_live.cpp
+++ b/modules/database/db_sql_live.cpp
@@ -75,7 +75,7 @@ class DBMySQL : public Module, public Pipe
throw ModuleException("If db_sql_live is loaded it must be the first database module loaded.");
}
- void OnNotify() anope_override
+ void OnNotify() override
{
if (!this->CheckInit())
return;
@@ -115,30 +115,30 @@ class DBMySQL : public Module, public Pipe
this->updated_items.clear();
}
- EventReturn OnLoadDatabase() anope_override
+ EventReturn OnLoadDatabase() override
{
init = true;
return EVENT_STOP;
}
- void OnShutdown() anope_override
+ void OnShutdown() override
{
init = false;
}
- void OnRestart() anope_override
+ void OnRestart() override
{
init = false;
}
- void OnReload(Configuration::Conf *conf) anope_override
+ void OnReload(Configuration::Conf *conf) override
{
Configuration::Block *block = conf->GetModule(this);
this->SQL = ServiceReference<Provider>("SQL::Provider", block->Get<const Anope::string>("engine"));
this->prefix = block->Get<const Anope::string>("prefix", "anope_db_");
}
- void OnSerializableConstruct(Serializable *obj) anope_override
+ void OnSerializableConstruct(Serializable *obj) override
{
if (!this->CheckInit())
return;
@@ -147,7 +147,7 @@ class DBMySQL : public Module, public Pipe
this->Notify();
}
- void OnSerializableDestruct(Serializable *obj) anope_override
+ void OnSerializableDestruct(Serializable *obj) override
{
if (!this->CheckInit())
return;
@@ -161,7 +161,7 @@ class DBMySQL : public Module, public Pipe
this->updated_items.erase(obj);
}
- void OnSerializeCheck(Serialize::Type *obj) anope_override
+ void OnSerializeCheck(Serialize::Type *obj) override
{
if (!this->CheckInit() || obj->GetTimestamp() == Anope::CurTime)
return;
@@ -240,7 +240,7 @@ class DBMySQL : public Module, public Pipe
}
}
- void OnSerializableUpdate(Serializable *obj) anope_override
+ void OnSerializableUpdate(Serializable *obj) override
{
if (!this->CheckInit() || obj->IsTSCached())
return;