From 224b6c5dd2e2f7201f4f3f223114c8367a6cb10d Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Sat, 8 Aug 2020 16:28:35 -0400 Subject: [PATCH] Fix a few warnings in rlv from gcc 9 --- indra/newview/rlvactions.cpp | 1 + indra/newview/rlvhandler.cpp | 9 +++++---- indra/newview/rlvhandler.h | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/indra/newview/rlvactions.cpp b/indra/newview/rlvactions.cpp index 793824a316b..570b0b4c193 100644 --- a/indra/newview/rlvactions.cpp +++ b/indra/newview/rlvactions.cpp @@ -216,6 +216,7 @@ bool RlvActions::canShowName(EShowNamesContext eContext, const LLUUID& idAgent) return (gRlvHandler.isException(RLV_BHVR_SHOWNAMETAGS, idAgent)) || (gAgentID == idAgent); // Show/hide avatar name case SNC_DEFAULT: + case SNC_COUNT: case SNC_TELEPORTOFFER: case SNC_TELEPORTREQUEST: return gRlvHandler.isException(RLV_BHVR_SHOWNAMES, idAgent) || (gAgentID == idAgent); diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index 9ef4cb5db5a..6ba6117e32a 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -830,7 +830,8 @@ void RlvHandler::setActiveGroupRole(const LLUUID& idGroup, const std::string& st // We have everything - activate the requested role (if we can find it) if (pGroupData) { - enum class EMatch { None, Partial, Exact } eMatch = EMatch::None; LLUUID idRole; + enum class EMatch { ENone, EPartial, EExact }; + EMatch eMatch = EMatch::ENone; LLUUID idRole; for (const auto& roleData : pGroupData->mRoles) { // NOTE: exact matches take precedence over partial matches; in case of partial matches the last match wins @@ -838,13 +839,13 @@ void RlvHandler::setActiveGroupRole(const LLUUID& idGroup, const std::string& st if (boost::istarts_with(strRoleName, strRole)) { idRole = roleData.first; - eMatch = (strRoleName.length() == strRole.length()) ? EMatch::Exact : EMatch::Partial; - if (eMatch == EMatch::Exact) + eMatch = (strRoleName.length() == strRole.length()) ? EMatch::EExact : EMatch::EPartial; + if (eMatch == EMatch::EExact) break; } } - if (eMatch != EMatch::None) + if (eMatch != EMatch::ENone) { RLV_INFOS << "Activating role '" << strRole << "' for group '" << pGroupData->mName << "'" << RLV_ENDL; LLGroupMgr::getInstance()->sendGroupTitleUpdate(idGroup, idRole); diff --git a/indra/newview/rlvhandler.h b/indra/newview/rlvhandler.h index c66414f63e4..70d50df0207 100644 --- a/indra/newview/rlvhandler.h +++ b/indra/newview/rlvhandler.h @@ -18,6 +18,7 @@ #define RLV_HANDLER_H #include "llgroupmgr.h" +#include "llviewertexture.h" #include <stack> #include "rlvcommon.h" -- GitLab