diff --git a/indra/newview/rlvcommon.cpp b/indra/newview/rlvcommon.cpp index 4fb8d3c7e36051c15708f22604610b893a5df95b..3b54bbd3344bae3920469ae3685a7ef0ddf639a1 100644 --- a/indra/newview/rlvcommon.cpp +++ b/indra/newview/rlvcommon.cpp @@ -40,10 +40,6 @@ #include "rlvhandler.h" #include "rlvlocks.h" -#include <absl/strings/str_format.h> -#include <absl/strings/str_replace.h> -#include <absl/strings/str_split.h> - #include <boost/algorithm/string.hpp> #include <boost/regex.hpp> diff --git a/indra/newview/rlvenvironment.cpp b/indra/newview/rlvenvironment.cpp index 639ac92c8c4604ec2192f2186061d6d8c53fe169..805390b3ce664e83effa70284a8650d57cd9985d 100644 --- a/indra/newview/rlvenvironment.cpp +++ b/indra/newview/rlvenvironment.cpp @@ -18,9 +18,7 @@ #include "llinventoryfunctions.h" #include "llsettingsvo.h" - -#include "absl/strings/match.h" -#include "absl/strings/str_format.h" +#include <boost/algorithm/string.hpp> #include "rlvactions.h" #include "rlvenvironment.h" @@ -535,7 +533,7 @@ std::string RlvEnvironment::handleGetFn<LLVector2>(const std::function<LLVector2 { LLSettingsSky::ptr_t pSky = LLEnvironment::instance().getCurrentSky(); LLVector2 replyVec = fn(pSky); - return absl::StrFormat("%f/%f", replyVec.mV[VX], replyVec.mV[VY]); + return llformat("%f/%f", replyVec.mV[VX], replyVec.mV[VY]); } template<> @@ -543,7 +541,7 @@ std::string RlvEnvironment::handleGetFn<LLColor3>(const std::function<LLColor3(L { LLSettingsSky::ptr_t pSky = LLEnvironment::instance().getCurrentSky(); LLColor3 replyColor = fn(pSky); - return absl::StrFormat("%f/%f/%f", replyColor.mV[VX], replyColor.mV[VY], replyColor.mV[VZ]); + return llformat("%f/%f/%f", replyColor.mV[VX], replyColor.mV[VY], replyColor.mV[VZ]); } template<typename T> diff --git a/indra/newview/rlvextensions.cpp b/indra/newview/rlvextensions.cpp index 311c60972705a517805579f7a4e90bf4ee2b1681..9a44df67785f313ed40fba53f2d822839e086a01 100644 --- a/indra/newview/rlvextensions.cpp +++ b/indra/newview/rlvextensions.cpp @@ -23,8 +23,6 @@ #include "rlvhandler.h" #include "rlvhelper.h" -#include "absl/strings/str_format.h" - // ============================================================================ std::map<std::string, S16> RlvExtGetSet::m_DbgAllowed; @@ -162,11 +160,11 @@ std::string RlvExtGetSet::onGetDebug(std::string strSetting) switch (pSetting->type()) { case TYPE_U32: - return absl::StrFormat("%u", gSavedSettings.getU32(strSetting)); + return llformat("%u", gSavedSettings.getU32(strSetting)); case TYPE_S32: - return absl::StrFormat("%d", gSavedSettings.getS32(strSetting)); + return llformat("%d", gSavedSettings.getS32(strSetting)); case TYPE_BOOLEAN: - return absl::StrFormat("%d", gSavedSettings.getBOOL(strSetting)); + return llformat("%d", gSavedSettings.getBOOL(strSetting)); default: RLV_ERRS << "Unexpected debug setting type" << LL_ENDL; break; @@ -195,7 +193,7 @@ std::string RlvExtGetSet::onGetPseudoDebug(const std::string& strSetting) else { if (isAgentAvatarValid()) - return absl::StrFormat("%d", (gAgentAvatarp->getSex() == SEX_MALE)); // [See LLFloaterCustomize::LLFloaterCustomize()] + return llformat("%d", (gAgentAvatarp->getSex() == SEX_MALE)); // [See LLFloaterCustomize::LLFloaterCustomize()] } } return std::string(); diff --git a/indra/newview/rlvhandler.cpp b/indra/newview/rlvhandler.cpp index e2259e2ddf990e65a68e664c8f8e17d95ebc1197..92f5c6154e2e92ee0e3b2b014c318b2e79b24dde 100644 --- a/indra/newview/rlvhandler.cpp +++ b/indra/newview/rlvhandler.cpp @@ -70,9 +70,6 @@ // Boost includes #include <boost/algorithm/string.hpp> -// Abseil includes -#include <absl/strings/str_format.h> - // llappviewer.cpp extern BOOL gDoDisconnect; @@ -3462,7 +3459,7 @@ ERlvCmdRet RlvReplyHandler<RLV_BHVR_GETCAM_AVDIST>::onCommand(const RlvCommand& { if (rlvCmd.hasOption()) return RLV_RET_FAILED_OPTION; - strReply = absl::StrFormat("%.3lf", (gAgentCamera.getCameraPositionGlobal() - gAgent.getPositionGlobal()).magVec()); + strReply = llformat("%.3lf", (gAgentCamera.getCameraPositionGlobal() - gAgent.getPositionGlobal()).magVec()); return RLV_RET_SUCCESS; } @@ -3474,7 +3471,7 @@ ERlvCmdRet RlvReplyCamMinMaxModifierHandler::onCommand(const RlvCommand& rlvCmd, return RLV_RET_FAILED_OPTION; ERlvBehaviour eBhvr = RlvBehaviourDictionary::instance().getBehaviourFromString("setcam_" + rlvCmd.getBehaviour().substr(7), RLV_TYPE_ADDREM); if (RlvBehaviourModifier* pBhvrModifier = RlvBehaviourDictionary::instance().getModifierFromBehaviour(eBhvr)) - strReply = (pBhvrModifier->hasValue()) ? absl::StrFormat("%.3f", pBhvrModifier->getValue<float>()) : LLStringUtil::null; + strReply = (pBhvrModifier->hasValue()) ? llformat("%.3f", pBhvrModifier->getValue<float>()) : LLStringUtil::null; return RLV_RET_SUCCESS; } @@ -3512,7 +3509,7 @@ ERlvCmdRet RlvReplyHandler<RLV_BHVR_GETCAM_FOV>::onCommand(const RlvCommand& rlv { if (rlvCmd.hasOption()) return RLV_RET_FAILED_OPTION; - strReply = absl::StrFormat("%.3f", LLViewerCamera::getInstance()->getDefaultFOV()); + strReply = llformat("%.3f", LLViewerCamera::getInstance()->getDefaultFOV()); return RLV_RET_SUCCESS; } @@ -3565,7 +3562,7 @@ ERlvCmdRet RlvReplyHandler<RLV_BHVR_GETHEIGHTOFFSET>::onCommand(const RlvCommand else if (!isAgentAvatarValid()) return RLV_RET_FAILED_UNKNOWN; - strReply = absl::StrFormat("%.2f", gAgentAvatarp->getHoverOffset()[VZ] * 100.f); + strReply = llformat("%.2f", gAgentAvatarp->getHoverOffset()[VZ] * 100); return RLV_RET_SUCCESS; } @@ -3668,15 +3665,15 @@ ERlvCmdRet RlvHandler::onGetInvWorn(const RlvCommand& rlvCmd, std::string& strRe wi.cntChildWorn += wiFolder.cntWorn + wiFolder.cntChildWorn; wi.cntChildTotal += wiFolder.cntTotal + wiFolder.cntChildTotal; - absl::StrAppend(&strReply, absl::StrFormat(",%s|%d%d", gInventory.getCategory(itFolder->first)->getName(), + strReply += llformat(",%s|%d%d", gInventory.getCategory(itFolder->first)->getName().c_str(), (0 == wiFolder.cntTotal) ? 0 : (0 == wiFolder.cntWorn) ? 1 : (wiFolder.cntWorn != wiFolder.cntTotal) ? 2 : 3, (0 == wiFolder.cntChildTotal) ? 0 : (0 == wiFolder.cntChildWorn) ? 1 : (wiFolder.cntChildWorn != wiFolder.cntChildTotal) ? 2 : 3 - )); + ); } // Now just prepend the root and done - strReply = absl::StrCat(absl::StrFormat("|%d%d", (0 == wi.cntTotal) ? 0 : (0 == wi.cntWorn) ? 1 : (wi.cntWorn != wi.cntTotal) ? 2 : 3, - (0 == wi.cntChildTotal) ? 0 : (0 == wi.cntChildWorn) ? 1 : (wi.cntChildWorn != wi.cntChildTotal) ? 2: 3), strReply); + strReply = llformat("|%d%d", (0 == wi.cntTotal) ? 0 : (0 == wi.cntWorn) ? 1 : (wi.cntWorn != wi.cntTotal) ? 2 : 3, + (0 == wi.cntChildTotal) ? 0 : (0 == wi.cntChildWorn) ? 1 : (wi.cntChildWorn != wi.cntChildTotal) ? 2: 3) + strReply; return RLV_RET_SUCCESS; } diff --git a/indra/newview/rlvhelper.cpp b/indra/newview/rlvhelper.cpp index 41b586bb82d130501235414b4694004c4188d404..ef48789840787fe24c8f26741074c14a488cf863 100644 --- a/indra/newview/rlvhelper.cpp +++ b/indra/newview/rlvhelper.cpp @@ -27,10 +27,6 @@ #include "rlvinventory.h" #include "rlvmodifiers.h" -#include "absl/strings/match.h" -#include "absl/strings/str_format.h" -#include "absl/strings/str_split.h" - #include <boost/algorithm/string.hpp> // ============================================================================ @@ -858,7 +854,7 @@ bool RlvCommandOptionHelper::parseOption<RlvCommandOptionGeneric>(const std::str bool RlvCommandOptionHelper::parseStringList(const std::string& strOption, std::vector<std::string>& optionList, const std::string& strSeparator) { if (!strOption.empty()) - optionList = absl::StrSplit(strOption, strSeparator); + boost::split(optionList, strOption, boost::is_any_of(strSeparator)); return !optionList.empty(); } @@ -1001,11 +997,12 @@ bool RlvCommandOptionGetPath::getItemIDs(LLWearableType::EType wtType, uuid_vec_ RlvCommandOptionAdjustHeight::RlvCommandOptionAdjustHeight(const RlvCommand& rlvCmd) : m_nPelvisToFoot(0.0f), m_nPelvisToFootDeltaMult(0.0f), m_nPelvisToFootOffset(0.0f) { - std::vector<std::string> cmdTokens = absl::StrSplit(rlvCmd.getOption(), ';'); + std::vector<std::string> cmdTokens; + boost::split(cmdTokens, rlvCmd.getOption(), boost::is_any_of(std::string(";"))); if (1 == cmdTokens.size()) { m_fValid = (LLStringUtil::convertToF32(cmdTokens[0], m_nPelvisToFootOffset)); - m_nPelvisToFootOffset /= 100.f; + m_nPelvisToFootOffset /= 100; } else if ( (2 <= cmdTokens.size()) && (cmdTokens.size() <= 3) ) { @@ -1750,7 +1747,7 @@ void RlvBehaviourNotifyHandler::onCommand(const RlvCommand& rlvCmd, ERlvCmdRet e { case RLV_TYPE_ADD: case RLV_TYPE_REMOVE: - sendNotification(rlvCmd.asString(), absl::StrCat("=", rlvCmd.getParam())); + sendNotification(rlvCmd.asString(), "=" + rlvCmd.getParam()); break; case RLV_TYPE_CLEAR: sendNotification(rlvCmd.asString()); @@ -1772,7 +1769,7 @@ void RlvBehaviourNotifyHandler::sendNotification(const std::string& strText, con itNotify != pThis->m_Notifications.end(); ++itNotify) { if ( (itNotify->second.strFilter.empty()) || (boost::icontains(strText, itNotify->second.strFilter)) ) - RlvUtil::sendChatReply(itNotify->second.nChannel, absl::StrCat("/", strText, strSuffix)); + RlvUtil::sendChatReply(itNotify->second.nChannel, "/" + strText + strSuffix); } } } @@ -1780,31 +1777,31 @@ void RlvBehaviourNotifyHandler::sendNotification(const std::string& strText, con // Checked: 2011-03-31 (RLVa-1.3.0f) | Added: RLVa-1.3.0f void RlvBehaviourNotifyHandler::onWear(LLWearableType::EType eType, bool fAllowed) { - sendNotification(absl::StrFormat("worn %s %s", (fAllowed) ? "legally" : "illegally", LLWearableType::getTypeName(eType))); + sendNotification(llformat("worn %s %s", (fAllowed) ? "legally" : "illegally", LLWearableType::getTypeName(eType).c_str())); } // Checked: 2011-03-31 (RLVa-1.3.0f) | Added: RLVa-1.3.0f void RlvBehaviourNotifyHandler::onTakeOff(LLWearableType::EType eType, bool fAllowed) { - sendNotification(absl::StrFormat("unworn %s %s", (fAllowed) ? "legally" : "illegally", LLWearableType::getTypeName(eType))); + sendNotification(llformat("unworn %s %s", (fAllowed) ? "legally" : "illegally", LLWearableType::getTypeName(eType).c_str())); } // Checked: 2011-03-31 (RLVa-1.3.0f) | Added: RLVa-1.3.0f void RlvBehaviourNotifyHandler::onAttach(const LLViewerJointAttachment* pAttachPt, bool fAllowed) { - sendNotification(absl::StrFormat("attached %s %s", (fAllowed) ? "legally" : "illegally", pAttachPt->getName())); + sendNotification(llformat("attached %s %s", (fAllowed) ? "legally" : "illegally", pAttachPt->getName().c_str())); } // Checked: 2011-03-31 (RLVa-1.3.0f) | Added: RLVa-1.3.0f void RlvBehaviourNotifyHandler::onDetach(const LLViewerJointAttachment* pAttachPt, bool fAllowed) { - sendNotification(absl::StrFormat("detached %s %s", (fAllowed) ? "legally" : "illegally", pAttachPt->getName())); + sendNotification(llformat("detached %s %s", (fAllowed) ? "legally" : "illegally", pAttachPt->getName().c_str())); } // Checked: 2011-03-31 (RLVa-1.3.0f) | Added: RLVa-1.3.0f void RlvBehaviourNotifyHandler::onReattach(const LLViewerJointAttachment* pAttachPt, bool fAllowed) { - sendNotification(absl::StrFormat("reattached %s %s", (fAllowed) ? "legally" : "illegally", pAttachPt->getName())); + sendNotification(llformat("reattached %s %s", (fAllowed) ? "legally" : "illegally", pAttachPt->getName().c_str())); } // ========================================================================= diff --git a/indra/newview/rlvlocks.cpp b/indra/newview/rlvlocks.cpp index 4d62367e4a75aabbc70a77649fda380928bf55b8..4b94e34fdf55b2dd4d89d76bb9969583fa7fa642 100644 --- a/indra/newview/rlvlocks.cpp +++ b/indra/newview/rlvlocks.cpp @@ -27,7 +27,6 @@ #include "rlvhelper.h" #include "rlvinventory.h" -#include "absl/strings/str_format.h" // ============================================================================ // RlvAttachPtLookup member functions @@ -453,9 +452,9 @@ void RlvAttachmentLockWatchdog::RlvWearInfo::dumpInstance() const const LLViewerInventoryItem* pItem = gInventory.getItem(idItem); std::string strItemId = idItem.asString(); - RLV_INFOS << absl::StreamFormat("Wear %s '%s' (%s)", - (RLV_WEAR_ADD == eWearAction) ? "add" : "replace", (pItem) ? pItem->getName() : "missing", strItemId) - << RLV_ENDL; + std::string strTemp = llformat("Wear %s '%s' (%s)", + (RLV_WEAR_ADD == eWearAction) ? "add" : "replace", (pItem) ? pItem->getName().c_str() : "missing", strItemId.c_str()); + RLV_INFOS << strTemp.c_str() << RLV_ENDL; if (!attachPts.empty()) { @@ -469,10 +468,11 @@ void RlvAttachmentLockWatchdog::RlvWearInfo::dumpInstance() const for (uuid_vec_t::const_iterator itAttach = itAttachPt->second.begin(); itAttach != itAttachPt->second.end(); ++itAttach) { pItem = gInventory.getItem(*itAttach); - - RLV_INFOS << absl::StreamFormat(" -> %s : %s (%s)", - pAttachPt->getName(), (pItem) ? pItem->getName() : "missing", (*itAttach).asString()) - << RLV_ENDL; + strItemId = (*itAttach).asString(); + + strTemp = llformat(" -> %s : %s (%s)", + pAttachPt->getName().c_str(), (pItem) ? pItem->getName().c_str() : "missing", strItemId.c_str()); + RLV_INFOS << strTemp.c_str() << RLV_ENDL; } } else