mirror of
https://github.com/anope/anope.git
synced 2026-07-08 21:33:12 +02:00
Replace anope_{final,override} with their C++11 equivalent.
This commit is contained in:
@@ -23,7 +23,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)
|
||||
{
|
||||
@@ -46,7 +46,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)
|
||||
{
|
||||
@@ -78,7 +78,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)
|
||||
@@ -86,7 +86,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)
|
||||
@@ -178,12 +178,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)
|
||||
{
|
||||
@@ -197,7 +197,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);
|
||||
@@ -219,7 +219,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;
|
||||
@@ -269,7 +269,7 @@ class DBFlatFile : public Module, public Pipe
|
||||
}
|
||||
|
||||
|
||||
void OnSaveDatabase() anope_override
|
||||
void OnSaveDatabase() override
|
||||
{
|
||||
if (child_pid > -1)
|
||||
{
|
||||
@@ -376,7 +376,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;
|
||||
|
||||
@@ -1313,7 +1313,7 @@ class DBOld : public Module
|
||||
throw ModuleException("Invalid hash method");
|
||||
}
|
||||
|
||||
EventReturn OnLoadDatabase() anope_override
|
||||
EventReturn OnLoadDatabase() override
|
||||
{
|
||||
LoadNicks();
|
||||
LoadVHosts();
|
||||
@@ -1326,7 +1326,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)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,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)
|
||||
@@ -33,7 +33,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)
|
||||
@@ -41,7 +41,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)
|
||||
@@ -57,7 +57,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
|
||||
@@ -68,7 +68,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
|
||||
@@ -77,7 +77,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
|
||||
@@ -87,7 +87,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
|
||||
@@ -97,7 +97,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
|
||||
@@ -107,7 +107,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
|
||||
@@ -115,7 +115,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
|
||||
@@ -159,7 +159,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)
|
||||
{
|
||||
@@ -171,13 +171,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
|
||||
{
|
||||
if (!redis)
|
||||
{
|
||||
@@ -205,7 +205,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;
|
||||
@@ -217,13 +217,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();
|
||||
|
||||
@@ -251,7 +251,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();
|
||||
|
||||
+13
-13
@@ -19,12 +19,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();
|
||||
@@ -40,7 +40,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)
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
delete this;
|
||||
}
|
||||
|
||||
void OnError(const Result &r) anope_override
|
||||
void OnError(const Result &r) override
|
||||
{
|
||||
SQLSQLInterface::OnError(r);
|
||||
delete this;
|
||||
@@ -98,7 +98,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)
|
||||
{
|
||||
@@ -151,7 +151,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"));
|
||||
@@ -159,18 +159,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)
|
||||
{
|
||||
@@ -193,7 +193,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;
|
||||
@@ -202,7 +202,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;
|
||||
@@ -212,7 +212,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;
|
||||
@@ -223,7 +223,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;
|
||||
|
||||
@@ -83,7 +83,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;
|
||||
@@ -123,30 +123,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;
|
||||
@@ -155,7 +155,7 @@ class DBMySQL : public Module, public Pipe
|
||||
this->Notify();
|
||||
}
|
||||
|
||||
void OnSerializableDestruct(Serializable *obj) anope_override
|
||||
void OnSerializableDestruct(Serializable *obj) override
|
||||
{
|
||||
if (!this->CheckInit())
|
||||
return;
|
||||
@@ -169,7 +169,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;
|
||||
@@ -251,7 +251,7 @@ class DBMySQL : public Module, public Pipe
|
||||
}
|
||||
}
|
||||
|
||||
void OnSerializableUpdate(Serializable *obj) anope_override
|
||||
void OnSerializableUpdate(Serializable *obj) override
|
||||
{
|
||||
if (!this->CheckInit() || obj->IsTSCached())
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user