diff options
author | Steven Bennetts <steve@lindenlab.com> | 2008-02-01 22:10:40 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2008-02-01 22:10:40 +0000 |
commit | 485c7ee0e2ebc2223c35fbb59a569ed889a1193c (patch) | |
tree | 35f827e55eecf91dab0a1c701a5645c0edf3335f /indra/llmessage | |
parent | b302f15deea0f4f7f5de75bfd3776c17021b6444 (diff) |
merge Branch_1-19-0-Viewer -r 78432:78989 -> release
QA'd in QAR-186:
DEV-9179: Commit translated and reviewed strings from 1.19 frozen branch pull
DEV-8792 Place information teleport button hidden behind chat bar.
DEV-9374: Remove "New Account..." and "Preferences" buttons from login screen for 1.19.0
DEV-9411 -- Update required version of Quicktime library to 7.4 for 1.19.0 Viewer
DEV-9430 Viewer auth failed login screen is shown in the loginxui 1.19 viewer on failure to retrieve normal login screen - changed wording of error page
DEV-8537 Chat console appearing underneath status buttons
DEV-9283 Chatbar cant be open while in mouselook
DEV-9226 Some Dazzle? icons have sneaked into the release branch
DEV-9520 Menus and Other items minimise behind onscreen buttons
DEV-9521 Unable to ctrl and click to select in the friends list
DEV-9530 SEC-20 Exploit to force users to teleport to a location on profile open.
DEV-6833 - Mature events icon and checkbox is missing from map legend
Also:
Added vc9 project files (+ minor changes for vc9) (steve)
Modified vc project files to not include the path for flex / bison (steve)
Added marker file deletion to crash logger to stop double reporting. (cube)
Diffstat (limited to 'indra/llmessage')
-rw-r--r-- | indra/llmessage/llmessagethrottle.cpp | 31 | ||||
-rw-r--r-- | indra/llmessage/llmessagethrottle.h | 4 |
2 files changed, 28 insertions, 7 deletions
diff --git a/indra/llmessage/llmessagethrottle.cpp b/indra/llmessage/llmessagethrottle.cpp index c45feb22fc..912980d738 100644 --- a/indra/llmessage/llmessagethrottle.cpp +++ b/indra/llmessage/llmessagethrottle.cpp @@ -37,8 +37,18 @@ #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(); } + { return a.getHash() == b.getHash(); } +#endif const U64 SEC_TO_USEC = 1000000; @@ -113,9 +123,14 @@ BOOL LLMessageThrottle::addViewerAlert(const LLUUID& to, const char* mesg) LLMessageThrottleEntry entry(hash, LLFrameTimer::getTotalTime()); // Check if this message is already in the list. - message_list_iterator_t found = std::search_n(message_list->begin(), message_list->end(), - 1, entry, eq_message_throttle_entry); - +#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. @@ -142,9 +157,15 @@ 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()) { // This message was not found. Add it to the list. diff --git a/indra/llmessage/llmessagethrottle.h b/indra/llmessage/llmessagethrottle.h index b43b5a02ca..a3267e7d9d 100644 --- a/indra/llmessage/llmessagethrottle.h +++ b/indra/llmessage/llmessagethrottle.h @@ -50,8 +50,8 @@ public: LLMessageThrottleEntry(const size_t hash, const U64 entry_time) : mHash(hash), mEntryTime(entry_time) {} - size_t getHash() { return mHash; } - U64 getEntryTime() { return mEntryTime; } + size_t getHash() const { return mHash; } + U64 getEntryTime() const { return mEntryTime; } protected: size_t mHash; U64 mEntryTime; |