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

@@ -31,7 +31,6 @@
#include "llnamevalue.h"
#include "u64.h"
#include "llstring.h"
#include "llstringtable.h"
@@ -149,7 +148,7 @@ void LLNameValue::init(const char *name, const char *data, const char *type, con
else if (!strcmp(mStringType, "U64"))
{
mType = NVT_U64;
mNameValueReference.u64 = new U64(str_to_U64(ll_safe_string(data)));
mNameValueReference.u64 = new U64(std::stoull(data));
}
else if (!strcmp(mStringType, "VEC3"))
{
@@ -919,9 +918,7 @@ std::string LLNameValue::printData() const
break;
case NVT_U64:
{
char u64_string[U64_BUFFER_LEN]; /* Flawfinder: ignore */
U64_to_str(*mNameValueReference.u64, u64_string, sizeof(u64_string));
buffer = u64_string;
buffer = fmt::to_string(*mNameValueReference.u64);
}
break;
case NVT_VEC3:
@@ -952,11 +949,7 @@ std::ostream& operator<<(std::ostream& s, const LLNameValue &a)
s << *(a.mNameValueReference.u32);
break;
case NVT_U64:
{
char u64_string[U64_BUFFER_LEN]; /* Flawfinder: ignore */
U64_to_str(*a.mNameValueReference.u64, u64_string, sizeof(u64_string));
s << u64_string;
}
s << (*a.mNameValueReference.u64);
break;
case NVT_VEC3:
s << *(a.mNameValueReference.vec3);