From 00863cab7c45b3429d7e21ed51d7984a09792af2 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Thu, 17 Dec 2020 15:09:58 -0500
Subject: [PATCH] Revert "And yet more format cleanup"

This reverts commit a3f771d5a7cf3498ae7d581ae180a6459a2db3c2.
---
 indra/llaudio/llaudioengine_fmodstudio.cpp |  2 +-
 indra/llmessage/llassetstorage.cpp         |  2 +-
 indra/llmessage/llcorehttputil.cpp         |  2 +-
 indra/llmessage/llhost.cpp                 |  2 +-
 indra/llmessage/llnamevalue.cpp            | 13 +++++++------
 indra/llmessage/llxfer_vfile.cpp           |  4 ++--
 indra/llmessage/net.cpp                    |  2 +-
 7 files changed, 14 insertions(+), 13 deletions(-)

diff --git a/indra/llaudio/llaudioengine_fmodstudio.cpp b/indra/llaudio/llaudioengine_fmodstudio.cpp
index 5bd4d4101a8..1c2e36d5d8d 100644
--- a/indra/llaudio/llaudioengine_fmodstudio.cpp
+++ b/indra/llaudio/llaudioengine_fmodstudio.cpp
@@ -263,7 +263,7 @@ std::string LLAudioEngine_FMODSTUDIO::getDriverName(bool verbose)
 		U32 version;
 		if(!Check_FMOD_Error(mSystem->getVersion(&version), "FMOD::System::getVersion"))
 		{
-			return absl::StrFormat("FMOD Studio %1x.%02x.%02x", version >> 16, version >> 8 & 0x000000FF, version & 0x000000FF);
+			return llformat("FMOD Studio %1x.%02x.%02x", version >> 16, version >> 8 & 0x000000FF, version & 0x000000FF);
 		}
 	}
 	return "FMOD Studio";
diff --git a/indra/llmessage/llassetstorage.cpp b/indra/llmessage/llassetstorage.cpp
index 529b7ab20c9..0e5bd395696 100644
--- a/indra/llmessage/llassetstorage.cpp
+++ b/indra/llmessage/llassetstorage.cpp
@@ -1401,7 +1401,7 @@ void LLAssetStorage::legacyGetDataCallback(LLVFS *vfs,
         std::string uuid_str;
 
         uuid.toString(uuid_str);
-        filename = absl::StrFormat("%s.%s",gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_str),LLAssetType::lookup(type));
+        filename = llformat("%s.%s",gDirUtilp->getExpandedFilename(LL_PATH_CACHE,uuid_str).c_str(),LLAssetType::lookup(type));
 
         LLFILE* fp = LLFile::fopen(filename, "wb");     /* Flawfinder: ignore */ 
         if (fp)
diff --git a/indra/llmessage/llcorehttputil.cpp b/indra/llmessage/llcorehttputil.cpp
index 8236e63fa62..d6e89bb16c7 100644
--- a/indra/llmessage/llcorehttputil.cpp
+++ b/indra/llmessage/llcorehttputil.cpp
@@ -1181,7 +1181,7 @@ void HttpCoroutineAdapter::checkDefaultHeaders(LLCore::HttpHeaders::ptr_t &heade
 
     if (!headers->find("X-SecondLife-UDP-Listen-Port") && gMessageSystem)
     {
-        headers->append("X-SecondLife-UDP-Listen-Port", absl::StrFormat("%d", gMessageSystem->mPort));
+        headers->append("X-SecondLife-UDP-Listen-Port", llformat("%d", gMessageSystem->mPort));
     }
 }
 
diff --git a/indra/llmessage/llhost.cpp b/indra/llmessage/llhost.cpp
index a5d8c5b6775..00b32a676ab 100644
--- a/indra/llmessage/llhost.cpp
+++ b/indra/llmessage/llhost.cpp
@@ -61,7 +61,7 @@ LLHost::LLHost(const std::string& ip_and_port)
 
 std::string LLHost::getString() const
 {
-	return absl::StrFormat("%s:%u", u32_to_ip_string(mIP), mPort);
+	return llformat("%s:%u", u32_to_ip_string(mIP), mPort);
 }
 
 
diff --git a/indra/llmessage/llnamevalue.cpp b/indra/llmessage/llnamevalue.cpp
index 3a26b906116..f7c0517b4c4 100644
--- a/indra/llmessage/llnamevalue.cpp
+++ b/indra/llmessage/llnamevalue.cpp
@@ -896,8 +896,9 @@ void LLNameValue::setVec3(const LLVector3 &a)
 
 std::string LLNameValue::printNameValue() const
 {
-	std::string buffer = absl::StrFormat("%s %s %s %s %s", 
-		mName, mStringType, mStringClass, mStringSendto, printData());
+	std::string buffer;
+	buffer = llformat("%s %s %s %s ", mName, mStringType, mStringClass, mStringSendto);
+	buffer += printData();
 //	LL_INFOS() << "Name Value Length: " << buffer.size() + 1 << LL_ENDL;
 	return buffer;
 }
@@ -912,13 +913,13 @@ std::string LLNameValue::printData() const
 		buffer = mNameValueReference.string;
 		break;
 	case NVT_F32:
-		buffer = absl::StrFormat("%f", *mNameValueReference.f32);
+		buffer = llformat("%f", *mNameValueReference.f32);
 		break;
 	case NVT_S32:
-		buffer = absl::StrFormat("%d", *mNameValueReference.s32);
+		buffer = llformat("%d", *mNameValueReference.s32);
 		break;
 	case NVT_U32:
-	  	buffer = absl::StrFormat("%u", *mNameValueReference.u32);
+	  	buffer = llformat("%u", *mNameValueReference.u32);
 		break;
 	case NVT_U64:
 		{
@@ -928,7 +929,7 @@ std::string LLNameValue::printData() const
 		}
 		break;
 	case NVT_VEC3:
-	  	buffer = absl::StrFormat("%f, %f, %f", mNameValueReference.vec3->mV[VX], mNameValueReference.vec3->mV[VY], mNameValueReference.vec3->mV[VZ]);
+	  	buffer = llformat( "%f, %f, %f", mNameValueReference.vec3->mV[VX], mNameValueReference.vec3->mV[VY], mNameValueReference.vec3->mV[VZ]);
 		break;
 	default:
 		LL_ERRS() << "Trying to print unknown NameValue type " << mStringType << LL_ENDL;
diff --git a/indra/llmessage/llxfer_vfile.cpp b/indra/llmessage/llxfer_vfile.cpp
index 52ffc090acd..ddc24342f68 100644
--- a/indra/llmessage/llxfer_vfile.cpp
+++ b/indra/llmessage/llxfer_vfile.cpp
@@ -72,7 +72,7 @@ void LLXfer_VFile::init (LLVFS *vfs, const LLUUID &local_id, LLAssetType::EType
 	std::string id_string;
 	mLocalID.toString(id_string);
 
-	mName = absl::StrFormat("VFile %s:%s", id_string, LLAssetType::lookup(mType));
+	mName = llformat("VFile %s:%s", id_string.c_str(), LLAssetType::lookup(mType));
 }
 	
 ///////////////////////////////////////////////////////////
@@ -128,7 +128,7 @@ S32 LLXfer_VFile::initializeRequest(U64 xfer_id,
 	std::string id_string;
 	mLocalID.toString(id_string);
 
-	mName = absl::StrFormat("VFile %s:%s", id_string, LLAssetType::lookup(mType));
+	mName = llformat("VFile %s:%s", id_string.c_str(), LLAssetType::lookup(mType));
 
 	LL_INFOS("Xfer") << "Requesting " << mName << LL_ENDL;
 
diff --git a/indra/llmessage/net.cpp b/indra/llmessage/net.cpp
index e7b4e40f5b0..739cde0d12f 100644
--- a/indra/llmessage/net.cpp
+++ b/indra/llmessage/net.cpp
@@ -462,7 +462,7 @@ S32 start_net(S32& socket_out, int& nPort)
 			// Some other socket error
 			else
 			{
-				LL_WARNS() << absl::StrFormat("bind() port: %d failed, Err: %s\n", nPort, strerror(errno)) << LL_ENDL;
+				LL_WARNS() << llformat ("bind() port: %d failed, Err: %s\n", nPort, strerror(errno)) << LL_ENDL;
 				// Fail gracefully in release.
 				return 4;
 			}
-- 
GitLab