summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2016-11-30 13:13:41 -0500
committerAdam <Adam@anope.org>2016-11-30 14:02:45 -0500
commit2f512281029fbf4f7ef9832e05804831ad2d9ba2 (patch)
tree10699640af6519991e2de009ffb4317daf4afd79
parenta2047d559972df3e3a1e423827c449accbe1ddd1 (diff)
Fix some field shadowing warnings
-rw-r--r--include/protocol.h4
-rw-r--r--include/serialize.h8
-rw-r--r--modules/database/sql.cpp4
-rw-r--r--modules/sqlite.cpp4
4 files changed, 10 insertions, 10 deletions
diff --git a/include/protocol.h b/include/protocol.h
index f7e7460f0..7475fed21 100644
--- a/include/protocol.h
+++ b/include/protocol.h
@@ -340,9 +340,9 @@ class IRCMessage
return source;
}
- void SetSource(const MessageSource &source)
+ void SetSource(const MessageSource &_source)
{
- this->source = source;
+ this->source = _source;
}
const Anope::string &GetCommand() const
diff --git a/include/serialize.h b/include/serialize.h
index cec6d225d..0b420bff0 100644
--- a/include/serialize.h
+++ b/include/serialize.h
@@ -372,9 +372,9 @@ class Serialize::FieldBase : public Service
* the object the field references gets deleted, this object
* gets deleted too.
*/
- bool depends;
+ bool depends = false;
- bool object = false;
+ bool is_object = false;
FieldBase(Module *, const Anope::string &, const Anope::string &, bool);
virtual ~FieldBase();
@@ -698,12 +698,12 @@ class Serialize::ObjectField : public CommonFieldBase<TypeImpl, T>
public:
ObjectField(TypeBase *t, const Anope::string &n, bool d = false) : CommonFieldBase<TypeImpl, T>(t, n, d)
{
- this->object = true;
+ this->is_object = true;
}
ObjectField(TypeBase *t, const Anope::string &n, T TypeImpl::*field, bool d = false) : CommonFieldBase<TypeImpl, T>(t, n, field, d)
{
- this->object = true;
+ this->is_object = true;
}
T GetField(TypeImpl *s)
diff --git a/modules/database/sql.cpp b/modules/database/sql.cpp
index e1b766b57..7ca4eb6d7 100644
--- a/modules/database/sql.cpp
+++ b/modules/database/sql.cpp
@@ -173,7 +173,7 @@ class DBSQL : public Module, public Pipe
{
for (Serialize::FieldBase *field : type->GetFields())
{
- if (field->object)
+ if (field->is_object)
{
Anope::string table = prefix + type->GetName();
@@ -344,7 +344,7 @@ class DBSQL : public Module, public Pipe
EventReturn OnSerializeHasField(Serialize::Object *object, Serialize::FieldBase *field) override
{
- if (field->object)
+ if (field->is_object)
{
Anope::string type;
Serialize::ID id;
diff --git a/modules/sqlite.cpp b/modules/sqlite.cpp
index e4893b1ce..5fbbb855e 100644
--- a/modules/sqlite.cpp
+++ b/modules/sqlite.cpp
@@ -301,7 +301,7 @@ std::vector<Query> SQLiteService::CreateTable(const Anope::string &prefix, Seria
query += "`" + field->serialize_name + "`";
fields.insert(field->serialize_name);
- if (field->object)
+ if (field->is_object)
{
Anope::string refname = field->GetTypeName() == Serialize::Object::NAME ? "objects" : field->GetTypeName();
query += " REFERENCES " + prefix + refname + "(id) ON DELETE ";
@@ -341,7 +341,7 @@ std::vector<Query> SQLiteService::AlterTable(const Anope::string &prefix, Serial
{
Anope::string buf = "ALTER TABLE `" + prefix + table + "` ADD `" + field->serialize_name + "`";
- if (field->object)
+ if (field->is_object)
{
buf += " REFERENCES " + prefix + "objects(id) ON DELETE ";