Skip to content
Snippets Groups Projects
Commit 7ff52b58 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Revert "Start changing a few llformat(vsnprtinf wrapper) over to absl::StrFormat"

This reverts commit e01b8b98.
parent 0a5d0e89
No related branches found
No related tags found
No related merge requests found
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
#include "absl/synchronization/mutex.h" #include "absl/synchronization/mutex.h"
#include "absl/container/flat_hash_map.h" #include "absl/container/flat_hash_map.h"
#include "absl/strings/str_format.h"
#include "llapp.h" #include "llapp.h"
#include "llapr.h" #include "llapr.h"
...@@ -654,7 +653,7 @@ namespace LLError ...@@ -654,7 +653,7 @@ namespace LLError
default: mLevelString = "XXX"; break; default: mLevelString = "XXX"; break;
}; };
mLocationString = absl::StrFormat("%s(%d)", abbreviateFile(mFile), mLine); mLocationString = llformat("%s(%d)", abbreviateFile(mFile).c_str(), mLine);
#if LL_WINDOWS #if LL_WINDOWS
// DevStudio: __FUNCTION__ already includes the full class name // DevStudio: __FUNCTION__ already includes the full class name
#else #else
...@@ -1413,7 +1412,7 @@ namespace LLError ...@@ -1413,7 +1412,7 @@ namespace LLError
return; return;
} }
if (out->str().length() < 128) if(strlen(out->str().c_str()) < 128)
{ {
strcpy(message, out->str().c_str()); strcpy(message, out->str().c_str());
} }
......
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
#include "llsdutil.h" #include "llsdutil.h"
#include "boost/bind.hpp" #include "boost/bind.hpp"
#include <absl/strings/str_format.h>
static LLInitParam::Parser::parser_read_func_map_t sReadFuncs; static LLInitParam::Parser::parser_read_func_map_t sReadFuncs;
static LLInitParam::Parser::parser_write_func_map_t sWriteFuncs; static LLInitParam::Parser::parser_write_func_map_t sWriteFuncs;
static LLInitParam::Parser::parser_inspect_func_map_t sInspectFuncs; static LLInitParam::Parser::parser_inspect_func_map_t sInspectFuncs;
...@@ -121,7 +119,7 @@ void LLParamSDParser::writeSDImpl(LLSD& sd, const LLInitParam::BaseBlock& block, ...@@ -121,7 +119,7 @@ void LLParamSDParser::writeSDImpl(LLSD& sd, const LLInitParam::BaseBlock& block,
it != mNameStack.end(); it != mNameStack.end();
++it) ++it)
{ {
absl::StrAppendFormat(&full_name, "[%s]", it->first); full_name += llformat("[%s]", it->first.c_str());
} }
return full_name; return full_name;
......
...@@ -37,8 +37,6 @@ ...@@ -37,8 +37,6 @@
#include <winnls.h> // for WideCharToMultiByte #include <winnls.h> // for WideCharToMultiByte
#endif #endif
#include <absl/strings/str_format.h>
LLTrace::BlockTimerStatHandle FT_STRING_FORMAT("String Format"); LLTrace::BlockTimerStatHandle FT_STRING_FORMAT("String Format");
...@@ -1041,19 +1039,19 @@ std::string LLStringOps::getReadableNumber(F64 num) ...@@ -1041,19 +1039,19 @@ std::string LLStringOps::getReadableNumber(F64 num)
{ {
if (fabs(num)>=1e9) if (fabs(num)>=1e9)
{ {
return absl::StrFormat("%.2lfB", num / 1e9); return llformat("%.2lfB", num / 1e9);
} }
else if (fabs(num)>=1e6) else if (fabs(num)>=1e6)
{ {
return absl::StrFormat("%.2lfM", num / 1e6); return llformat("%.2lfM", num / 1e6);
} }
else if (fabs(num)>=1e3) else if (fabs(num)>=1e3)
{ {
return absl::StrFormat("%.2lfK", num / 1e3); return llformat("%.2lfK", num / 1e3);
} }
else else
{ {
return absl::StrFormat("%.2lf", num); return llformat("%.2lf", num);
} }
} }
...@@ -1361,14 +1359,14 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token, ...@@ -1361,14 +1359,14 @@ bool LLStringUtil::formatDatetime(std::string& replacement, std::string token,
{ {
struct tm * gmt = gmtime (&loc_seconds); struct tm * gmt = gmtime (&loc_seconds);
LLStringUtil::format_map_t args; LLStringUtil::format_map_t args;
args["[MDAY]"] = absl::StrFormat("%d", gmt->tm_mday); args["[MDAY]"] = llformat ("%d", gmt->tm_mday);
replacement = LLStringOps::sDayFormat; replacement = LLStringOps::sDayFormat;
LLStringUtil::format(replacement, args); LLStringUtil::format(replacement, args);
} }
else if (code == "%-d") else if (code == "%-d")
{ {
struct tm * gmt = gmtime (&loc_seconds); struct tm * gmt = gmtime (&loc_seconds);
replacement = absl::StrFormat("%d", gmt->tm_mday); // day of the month without leading zero replacement = llformat ("%d", gmt->tm_mday); // day of the month without leading zero
} }
else if( !LLStringOps::sAM.empty() && !LLStringOps::sPM.empty() && code == "%p" ) else if( !LLStringOps::sAM.empty() && !LLStringOps::sPM.empty() && code == "%p" )
{ {
......
...@@ -39,8 +39,6 @@ ...@@ -39,8 +39,6 @@
# error "architecture not supported" # error "architecture not supported"
#endif #endif
#include <absl/strings/str_format.h>
#include <chrono> #include <chrono>
#include <thread> #include <thread>
...@@ -469,7 +467,7 @@ void microsecondsToTimecodeString(U64MicrosecondsImplicit current_time, std::str ...@@ -469,7 +467,7 @@ void microsecondsToTimecodeString(U64MicrosecondsImplicit current_time, std::str
subframes = current_time / (U64)42; subframes = current_time / (U64)42;
subframes %= 100; subframes %= 100;
tcstring = absl::StrFormat("%3.3d:%2.2d:%2.2d:%2.2d.%2.2d", hours, minutes, seconds, frames, subframes); tcstring = llformat("%3.3d:%2.2d:%2.2d:%2.2d.%2.2d",(int)hours,(int)minutes,(int)seconds,(int)frames,(int)subframes);
} }
......
...@@ -45,8 +45,6 @@ ...@@ -45,8 +45,6 @@
#include "llthread.h" #include "llthread.h"
#include "llmutex.h" #include "llmutex.h"
#include <absl/strings/str_format.h>
const LLUUID LLUUID::null; const LLUUID LLUUID::null;
const LLTransactionID LLTransactionID::tnull; const LLTransactionID LLTransactionID::tnull;
...@@ -156,7 +154,7 @@ U32 janky_fast_random_seeded_bytes(U32 seed, U32 val) ...@@ -156,7 +154,7 @@ U32 janky_fast_random_seeded_bytes(U32 seed, U32 val)
// Common to all UUID implementations // Common to all UUID implementations
void LLUUID::toString(std::string& out) const void LLUUID::toString(std::string& out) const
{ {
out = absl::StrFormat( out = llformat(
"%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x",
(U8)(mData[0]), (U8)(mData[0]),
(U8)(mData[1]), (U8)(mData[1]),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment