mirror of
https://github.com/anope/anope.git
synced 2026-06-25 05:36:37 +02:00
That doesn't work either, just don't use references.
find ./ -name '*.cpp' -exec sed -i 's/Get<const Anope::string\&>/Get<const Anope::string>/g' {} \;
This commit is contained in:
@@ -119,7 +119,7 @@ class DBFlatFile : public Module, public Pipe
|
||||
const std::vector<Anope::string> &type_order = Serialize::Type::GetTypeOrder();
|
||||
|
||||
std::set<Anope::string> dbs;
|
||||
dbs.insert(Config->GetModule(this)->Get<const Anope::string &>("database"));
|
||||
dbs.insert(Config->GetModule(this)->Get<const Anope::string>("database"));
|
||||
|
||||
for (unsigned i = 0; i < type_order.size(); ++i)
|
||||
{
|
||||
@@ -195,7 +195,7 @@ class DBFlatFile : public Module, public Pipe
|
||||
const std::vector<Anope::string> &type_order = Serialize::Type::GetTypeOrder();
|
||||
std::set<Anope::string> tried_dbs;
|
||||
|
||||
const Anope::string &db_name = Anope::DataDir + "/" + Config->GetModule(this)->Get<const Anope::string &>("database");
|
||||
const Anope::string &db_name = Anope::DataDir + "/" + Config->GetModule(this)->Get<const Anope::string>("database");
|
||||
|
||||
std::fstream fd(db_name.c_str(), std::ios_base::in);
|
||||
if (!fd.is_open())
|
||||
@@ -272,7 +272,7 @@ class DBFlatFile : public Module, public Pipe
|
||||
if (s_type->GetOwner())
|
||||
db_name = Anope::DataDir + "/module_" + s_type->GetOwner()->name + ".db";
|
||||
else
|
||||
db_name = Anope::DataDir + "/" + Config->GetModule(this)->Get<const Anope::string &>("database");
|
||||
db_name = Anope::DataDir + "/" + Config->GetModule(this)->Get<const Anope::string>("database");
|
||||
|
||||
if (Anope::IsFile(db_name))
|
||||
rename(db_name.c_str(), (db_name + ".tmp").c_str());
|
||||
@@ -304,7 +304,7 @@ class DBFlatFile : public Module, public Pipe
|
||||
for (std::map<Module *, std::fstream *>::iterator it = databases.begin(), it_end = databases.end(); it != it_end; ++it)
|
||||
{
|
||||
std::fstream *f = it->second;
|
||||
const Anope::string &db_name = Anope::DataDir + "/" + (it->first ? (it->first->name + ".db") : Config->GetModule(this)->Get<const Anope::string &>("database"));
|
||||
const Anope::string &db_name = Anope::DataDir + "/" + (it->first ? (it->first->name + ".db") : Config->GetModule(this)->Get<const Anope::string>("database"));
|
||||
|
||||
if (!f->is_open() || !f->good())
|
||||
{
|
||||
@@ -349,7 +349,7 @@ class DBFlatFile : public Module, public Pipe
|
||||
if (stype->GetOwner())
|
||||
db_name = Anope::DataDir + "/module_" + stype->GetOwner()->name + ".db";
|
||||
else
|
||||
db_name = Anope::DataDir + "/" + Config->GetModule(this)->Get<const Anope::string &>("database");
|
||||
db_name = Anope::DataDir + "/" + Config->GetModule(this)->Get<const Anope::string>("database");
|
||||
|
||||
std::fstream fd(db_name.c_str(), std::ios_base::in);
|
||||
if (!fd.is_open())
|
||||
|
||||
Reference in New Issue
Block a user