Now that fmt plays nice with gcc let's actually use it: replace std::to_string, boost lexical_cast and a couple miscellaneous llformats with fmt. (Alchemy sync-ish)

This commit is contained in:
Router Gray
2020-05-20 14:38:30 -05:00
parent 34a7ebf53f
commit 3e78b74474
31 changed files with 92 additions and 113 deletions

View File

@@ -151,7 +151,6 @@
#include "llviewerobjectbackup.h"
#include "llagentui.h"
#include "llpathfindingmanager.h"
#include <boost/lexical_cast.hpp>
#include "lltexturecache.h"
#include "llvovolume.h"
@@ -684,9 +683,9 @@ void init_menus()
std::string symbol = gHippoGridManager->getConnectedGrid()->getCurrencySymbol();
auto& benefits = LLAgentBenefitsMgr::current();
const std::string texture_upload_cost_str = symbol + std::to_string(benefits.getTextureUploadCost());
const std::string sound_upload_cost_str = symbol + std::to_string(benefits.getSoundUploadCost());
const std::string animation_upload_cost_str = symbol + std::to_string(benefits.getAnimationUploadCost());
const std::string texture_upload_cost_str = symbol + fmt::to_string(benefits.getTextureUploadCost());
const std::string sound_upload_cost_str = symbol + fmt::to_string(benefits.getSoundUploadCost());
const std::string animation_upload_cost_str = symbol + fmt::to_string(benefits.getAnimationUploadCost());
gMenuHolder->childSetLabelArg("Upload Image", "[UPLOADFEE]", texture_upload_cost_str);
gMenuHolder->childSetLabelArg("Upload Sound", "[UPLOADFEE]", sound_upload_cost_str);
gMenuHolder->childSetLabelArg("Upload Animation", "[UPLOADFEE]", animation_upload_cost_str);
@@ -2836,7 +2835,7 @@ class LLObjectMeasure final : public view_listener_t
LLFloaterChat::addChat(chat);
LLStringUtil::format_map_t args;
args["[DIST]"] = boost::lexical_cast<std::string>(dist_vec(startMeasurePoint, position));
args["[DIST]"] = fmt::to_string(dist_vec(startMeasurePoint, position));
chat.mText = LLTrans::getString("MeasuredDistance", args);
startpoint_set = false;