Collaboration between myself and Router the Gray to Flinux

This commit is contained in:
Liru Færs
2020-02-25 13:25:12 -05:00
parent 16b8980d28
commit a652cb4f0a
3 changed files with 13 additions and 13 deletions

View File

@@ -537,7 +537,7 @@ public:
OctreeStats::getInstance()->realloc(old_cap,mData.capacity());
#endif
notifyAddition(data);
this->notifyAddition(data);
return true;
}
else
@@ -593,7 +593,7 @@ public:
OctreeStats::getInstance()->realloc(old_cap,mData.capacity());
#endif
notifyAddition(data);
this->notifyAddition(data);
return true;
}
@@ -704,7 +704,7 @@ public:
#endif
}
notifyRemoval(data);
this->notifyRemoval(data);
checkAlive();
}

View File

@@ -68,7 +68,7 @@ private:
protected:
void reset() { updateTime(); mAmount = 1; mBlocked = false; }
const U32& getAmount() const { return mAmount; }
const U32& getTime() const { return mTime; }
const std::time_t& getTime() const { return mTime; }
void updateTime() { mTime = time(nullptr); }
void block() { mBlocked = true; }
bool withinBlockTime(const U32& time_limit) const { return (time(nullptr) - mTime) <= time_limit; }
@@ -146,7 +146,7 @@ bool is_collision_sound(const std::string& sound)
}
// NaClAntiSpamRegistry
constexpr std::array<char*, NACLAntiSpamRegistry::QUEUE_MAX> QUEUE_NAME = {
constexpr std::array<const char*, NACLAntiSpamRegistry::QUEUE_MAX> QUEUE_NAME = {
"Chat",
"Inventory",
"Instant Message",
@@ -178,7 +178,7 @@ void NACLAntiSpamRegistry::initializeQueues(bool global, const U32& time, const
mGlobalQueue.reset(new NACLAntiSpamQueue(time, amount));
else
{
mQueues.reset(new std::array<NACLAntiSpamQueue, QUEUE_MAX>{
mQueues.reset(new std::array<NACLAntiSpamQueue, QUEUE_MAX>{{
NACLAntiSpamQueue(time, amount), // QUEUE_CHAT
NACLAntiSpamQueue(time, amount), // QUEUE_INVENTORY
NACLAntiSpamQueue(time, amount), // QUEUE_IM
@@ -187,7 +187,7 @@ void NACLAntiSpamRegistry::initializeQueues(bool global, const U32& time, const
NACLAntiSpamQueue(time, amount), // QUEUE_SOUND_PRELOAD
NACLAntiSpamQueue(time, amount), // QUEUE_SCRIPT_DIALOG
NACLAntiSpamQueue(time, amount) // QUEUE_TELEPORT
});
}});
}
}

View File

@@ -813,16 +813,16 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
std::vector<speaker_entry_t> speakerentries;
if ( update.has("agent_updates") && update["agent_updates"].isMap() )
{
for (const auto& update : update["agent_updates"].map())
for (const auto& update_it : update["agent_updates"].map())
{
LLUUID agent_id(update.first);
LLUUID agent_id(update_it.first);
LLPointer<LLSpeaker> speakerp = findSpeaker(agent_id);
bool new_speaker = false;
boost::optional<bool> moderator;
boost::optional<bool> moderator_muted_text;
LLSD agent_data = update.second;
LLSD agent_data = update_it.second;
if (agent_data.isMap() && agent_data.has("transition"))
{
if (agent_data["transition"].asString() == "LEAVE")
@@ -869,12 +869,12 @@ void LLIMSpeakerMgr::updateSpeakers(const LLSD& update)
}
else if ( update.has("updates") && update["updates"].isMap() )
{
for (const auto& update : update["updates"].map())
for (const auto& update_it : update["updates"].map())
{
LLUUID agent_id(update.first);
LLUUID agent_id(update_it.first);
LLPointer<LLSpeaker> speakerp = findSpeaker(agent_id);
std::string agent_transition = update.second.asString();
std::string agent_transition = update_it.second.asString();
if (agent_transition == "LEAVE")
{
setSpeakerNotInChannel(speakerp);