summaryrefslogtreecommitdiff
path: root/indra/llmessage
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-09-03 00:16:35 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-09-03 00:18:26 +0300
commitb18f328c08a0af7032c24843cf1d045eea73ad33 (patch)
tree9db8549ad49b40bc100199bc7a0004ab1a7ce235 /indra/llmessage
parentb12dd38c57fd9b047382e6e2d80b26f36888eb39 (diff)
parentf949415ad6d83c7c7cab282b45b1a639196b2090 (diff)
Merge branch 'DRTVWR-522-maint' into DRTVWR-545-maint-mix
# Conflicts: # indra/newview/llappviewer.cpp # indra/newview/llappviewerwin32.cpp # indra/newview/llmachineid.cpp
Diffstat (limited to 'indra/llmessage')
-rw-r--r--indra/llmessage/llcircuit.cpp11
-rw-r--r--indra/llmessage/lldispatcher.cpp2
-rw-r--r--indra/llmessage/llmessagethrottle.cpp22
3 files changed, 6 insertions, 29 deletions
diff --git a/indra/llmessage/llcircuit.cpp b/indra/llmessage/llcircuit.cpp
index 8baa2e328b..a39989515e 100644
--- a/indra/llmessage/llcircuit.cpp
+++ b/indra/llmessage/llcircuit.cpp
@@ -436,12 +436,11 @@ LLCircuit::LLCircuit(const F32Seconds circuit_heartbeat_interval, const F32Secon
LLCircuit::~LLCircuit()
{
- // delete pointers in the map.
- std::for_each(mCircuitData.begin(),
- mCircuitData.end(),
- llcompose1(
- DeletePointerFunctor<LLCircuitData>(),
- llselect2nd<circuit_data_map::value_type>()));
+ // delete pointers in the map.
+ for (auto circ_pair : mCircuitData)
+ {
+ delete circ_pair.second;
+ }
}
LLCircuitData *LLCircuit::addCircuitData(const LLHost &host, TPACKETID in_id)
diff --git a/indra/llmessage/lldispatcher.cpp b/indra/llmessage/lldispatcher.cpp
index 717ef10f70..8dfd924f31 100644
--- a/indra/llmessage/lldispatcher.cpp
+++ b/indra/llmessage/lldispatcher.cpp
@@ -62,7 +62,7 @@ void LLDispatcher::copyAllHandlerNames(keys_t& names) const
mHandlers.begin(),
mHandlers.end(),
std::back_insert_iterator<keys_t>(names),
- llselect1st<dispatch_map_t::value_type>());
+ [](const dispatch_map_t::value_type& pair){ return pair.first; });
}
bool LLDispatcher::dispatch(
diff --git a/indra/llmessage/llmessagethrottle.cpp b/indra/llmessage/llmessagethrottle.cpp
index 579d6d7187..c5ae8b4547 100644
--- a/indra/llmessage/llmessagethrottle.cpp
+++ b/indra/llmessage/llmessagethrottle.cpp
@@ -32,18 +32,8 @@
#include "llframetimer.h"
// This is used for the stl search_n function.
-#if _MSC_VER >= 1500 // VC9 has a bug in search_n
-struct eq_message_throttle_entry : public std::binary_function< LLMessageThrottleEntry, LLMessageThrottleEntry, bool >
-{
- bool operator()(const LLMessageThrottleEntry& a, const LLMessageThrottleEntry& b) const
- {
- return a.getHash() == b.getHash();
- }
-};
-#else
bool eq_message_throttle_entry(LLMessageThrottleEntry a, LLMessageThrottleEntry b)
{ return a.getHash() == b.getHash(); }
-#endif
const U64 SEC_TO_USEC = 1000000;
@@ -118,14 +108,8 @@ BOOL LLMessageThrottle::addViewerAlert(const LLUUID& to, const std::string& mesg
LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime());
// Check if this message is already in the list.
-#if _MSC_VER >= 1500 // VC9 has a bug in search_n
- // SJB: This *should* work but has not been tested yet *TODO: Test!
- message_list_iterator_t found = std::find_if(message_list->begin(), message_list->end(),
- std::bind2nd(eq_message_throttle_entry(), entry));
-#else
message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(),
1, entry, eq_message_throttle_entry);
-#endif
if (found == message_list->end())
{
// This message was not found. Add it to the list.
@@ -152,14 +136,8 @@ BOOL LLMessageThrottle::addAgentAlert(const LLUUID& agent, const LLUUID& task, c
LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime());
// Check if this message is already in the list.
-#if _MSC_VER >= 1500 // VC9 has a bug in search_n
- // SJB: This *should* work but has not been tested yet *TODO: Test!
- message_list_iterator_t found = std::find_if(message_list->begin(), message_list->end(),
- std::bind2nd(eq_message_throttle_entry(), entry));
-#else
message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(),
1, entry, eq_message_throttle_entry);
-#endif
if (found == message_list->end())
{