summaryrefslogtreecommitdiff
path: root/indra/llmessage/llmessagethrottle.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-08-27 19:24:05 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-08-27 19:24:05 +0300
commit203ea3a70a775a09cbbffb1740ab7c58f1780baa (patch)
tree828b0ea2336944d7ab0cc78704ae364966ec98a1 /indra/llmessage/llmessagethrottle.cpp
parent8e3f0778863a5aa337d1148a243ea91d238a8ac5 (diff)
parent2e790e9b7250d5f79751fa5287c1993f3fa5c776 (diff)
Merge branch 'c++17' into DRTVWR-522-maint
Diffstat (limited to 'indra/llmessage/llmessagethrottle.cpp')
-rw-r--r--indra/llmessage/llmessagethrottle.cpp22
1 files changed, 0 insertions, 22 deletions
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())
{