From 84a1e74e9e3c4b6ce5d97fed24da57fec36b05e9 Mon Sep 17 00:00:00 2001 From: Kitty Barnett <develop@catznip.com> Date: Wed, 16 Sep 2020 14:43:10 +0200 Subject: [PATCH] Post-merge fix-ups --- indra/newview/rlvactions.cpp | 2 +- indra/newview/rlvhandler.cpp | 8 ++++---- indra/newview/rlvui.cpp | 6 +++++- indra/newview/rlvui.h | 4 ++++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/indra/newview/rlvactions.cpp b/indra/newview/rlvactions.cpp index 2b2753dee7d..379bc14e917 100644 --- a/indra/newview/rlvactions.cpp +++ b/indra/newview/rlvactions.cpp @@ -194,7 +194,7 @@ bool RlvActions::canSendTypingStart() // The CHAT_TYPE_START indicator can be sent if: // - nearby chat isn't being redirected // - the user specifically indicated that they want to show typing under @redirchat - return !RlvHandler::instance().hasBehaviour(RLV_BHVR_REDIRCHAT) || gSavedSettings.get<bool>(RLV_SETTING_SHOWREDIRECTCHATTYPING); + return !RlvHandler::instance().hasBehaviour(RLV_BHVR_REDIRCHAT) || gSavedSettings.get<bool>(RlvSettingNames::ShowRedirectChatTyping); } bool RlvActions::canStartIM(const LLUUID& idRecipient, bool fIgnoreOpen) diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index 6b462d01df6..369eb3334c4 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -1871,9 +1871,9 @@ void RlvBehaviourToggleHandler<RLV_BHVR_BUY>::onCommandToggle(ERlvBehaviour eBhv // Start or stop filtering opening the buy, buy contents and pay object floaters if (fHasBhvr) { - RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("buy_object", std::string(RLV_STRING_BLOCKED_GENERIC))); - RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("buy_object_contents", std::string(RLV_STRING_BLOCKED_GENERIC))); - RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("pay_object", std::string(RLV_STRING_BLOCKED_GENERIC))); + RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("buy_object", RlvStringKeys::Blocked::Generic)); + RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("buy_object_contents", RlvStringKeys::Blocked::Generic)); + RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("pay_object", RlvStringKeys::Blocked::Generic)); } else { @@ -2032,7 +2032,7 @@ void RlvBehaviourToggleHandler<RLV_BHVR_PAY>::onCommandToggle(ERlvBehaviour eBhv // Start or stop filtering opening the pay avatar floater if (fHasBhvr) { - RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("pay_resident")); + RLV_VERIFY(RlvUIEnabler::instance().addGenericFloaterFilter("pay_resident", RlvStringKeys::Blocked::Generic)); } else { diff --git a/indra/newview/rlvui.cpp b/indra/newview/rlvui.cpp index 62ddf89189c..ae6a4e358af 100644 --- a/indra/newview/rlvui.cpp +++ b/indra/newview/rlvui.cpp @@ -279,7 +279,11 @@ void RlvUIEnabler::onUpdateLoginLastLocation(bool fQuitting) // ============================================================================ +#ifdef CATZNIP_STRINGVIEW +bool RlvUIEnabler::addGenericFloaterFilter(const std::string& strFloaterName, const boost::string_view& strRlvNotification) +#else bool RlvUIEnabler::addGenericFloaterFilter(const std::string& strFloaterName, const std::string& strRlvNotification) +#endif // CATZNIP_STRINGVIEW { return addGenericFloaterFilter(strFloaterName, [strRlvNotification]() { RlvUtil::notifyBlocked(strRlvNotification); }); } @@ -303,7 +307,7 @@ bool RlvUIEnabler::addGenericFloaterFilter(const std::string& strFloaterName, co bool RlvUIEnabler::removeGenericFloaterFilter(const std::string& strFloaterName) { auto itFloater = m_FilteredFloaterMap.find(strFloaterName); - if (itFloater != m_FilteredFloaterMap.end()) + if (m_FilteredFloaterMap.end() == itFloater) return false; m_FilteredFloaterMap.erase(itFloater); diff --git a/indra/newview/rlvui.h b/indra/newview/rlvui.h index c53a9ab1908..2040fe46549 100644 --- a/indra/newview/rlvui.h +++ b/indra/newview/rlvui.h @@ -55,7 +55,11 @@ class RlvUIEnabler : public LLSingleton<RlvUIEnabler> * Floater and sidebar validation callbacks */ public: +#ifdef CATZNIP_STRINGVIEW + bool addGenericFloaterFilter(const std::string& strFloaterName, const boost::string_view& strRlvNotification); +#else bool addGenericFloaterFilter(const std::string& strFloaterName, const std::string& strRlvNotification); +#endif // CATZNIP_STRINGVIEW bool addGenericFloaterFilter(const std::string& strFloaterName, const std::function<void()>& fn = nullptr); bool removeGenericFloaterFilter(const std::string& strFloaterName); -- GitLab