1
0
mirror of https://github.com/anope/anope.git synced 2026-07-08 02:03:13 +02:00

Fix not setting the correct compile flags on modules and fix the resulting warnings

This commit is contained in:
Adam
2013-07-20 02:55:25 -04:00
parent 492eac20a8
commit 6db0186947
16 changed files with 53 additions and 50 deletions
+1 -1
View File
@@ -279,7 +279,7 @@ EventReturn OnDatabaseReadMetadata(ChannelInfo *ci, const Anope::string &key, co
ci->Extend<bool>(params[i]);
else if (params[0].equals_ci("TTB"))
{
for (unsigned j = 1, end = params.size(); j < end &&& kd; j += 2)
for (unsigned j = 1, end = params.size(); j < end && kd; j += 2)
{
if (params[j].equals_ci("BOLDS"))
kd->ttb[0] = params[j + 1].is_pos_number_only() ? convertTo<int16_t>(params[j + 1]) : 0;
+10 -10
View File
@@ -137,11 +137,11 @@ class DatabaseRedis : public Module, public Pipe
/* Insert or update an object */
void InsertObject(Serializable *obj)
{
Serialize::Type *type = obj->GetSerializableType();
Serialize::Type *t = obj->GetSerializableType();
/* If there is no id yet for ths object, get one */
if (!obj->id)
redis->SendCommand(new IDInterface(this, obj), "INCR id:" + type->GetName());
redis->SendCommand(new IDInterface(this, obj), "INCR id:" + t->GetName());
else
{
Data data;
@@ -154,10 +154,10 @@ class DatabaseRedis : public Module, public Pipe
std::vector<Anope::string> args;
args.push_back("HGETALL");
args.push_back("hash:" + type->GetName() + ":" + stringify(obj->id));
args.push_back("hash:" + t->GetName() + ":" + stringify(obj->id));
/* Get object attrs to clear before updating */
redis->SendCommand(new Updater(this, type->GetName(), obj->id), args);
redis->SendCommand(new Updater(this, t->GetName(), obj->id), args);
}
}
@@ -215,17 +215,17 @@ class DatabaseRedis : public Module, public Pipe
void OnSerializableDestruct(Serializable *obj) anope_override
{
Serialize::Type *type = obj->GetSerializableType();
Serialize::Type *t = obj->GetSerializableType();
std::vector<Anope::string> args;
args.push_back("HGETALL");
args.push_back("hash:" + type->GetName() + ":" + stringify(obj->id));
args.push_back("hash:" + t->GetName() + ":" + stringify(obj->id));
/* Get all of the attributes for this object */
redis->SendCommand(new Deleter(this, type->GetName(), obj->id), args);
redis->SendCommand(new Deleter(this, t->GetName(), obj->id), args);
this->updated_items.erase(obj);
type->objects.erase(obj->id);
t->objects.erase(obj->id);
this->Notify();
}
@@ -530,12 +530,12 @@ void SubscriptionListener::OnResult(const Reply &r)
typedef std::map<Anope::string, std::stringstream *> items;
for (items::iterator it = data.data.begin(), it_end = data.data.end(); it != it_end; ++it)
{
const Anope::string &key = it->first;
const Anope::string &k = it->first;
std::stringstream *value = it->second;
std::vector<Anope::string> args;
args.push_back("SREM");
args.push_back("value:" + type + ":" + key + ":" + value->str());
args.push_back("value:" + type + ":" + k + ":" + value->str());
args.push_back(id);
/* Delete value -> object id */