summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsdserialize.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2024-06-10 20:03:54 +0300
committerGitHub <noreply@github.com>2024-06-10 20:03:54 +0300
commitf74c10c4ec6435471bac84473fe865f90843c2df (patch)
treeb2853d87789dbb84d6c26c259eab6639d3a7e482 /indra/llcommon/llsdserialize.cpp
parent5fccb539937a52d286274a002266e022e2102e5e (diff)
parent32fcefc058ae38eff0572326ef3efd1c7b343144 (diff)
Merge branch 'DRTVWR-600-maint-A' into signal/trim-trailing
Diffstat (limited to 'indra/llcommon/llsdserialize.cpp')
-rw-r--r--indra/llcommon/llsdserialize.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index d5af31a28e..15002580c9 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -389,7 +389,7 @@ LLSDParser::~LLSDParser()
S32 LLSDParser::parse(std::istream& istr, LLSD& data, llssize max_bytes, S32 max_depth)
{
- mCheckLimits = (LLSDSerialize::SIZE_UNLIMITED == max_bytes) ? false : true;
+ mCheckLimits = LLSDSerialize::SIZE_UNLIMITED != max_bytes;
mMaxBytesLeft = max_bytes;
return doParse(istr, data, max_depth);
}
@@ -1546,7 +1546,7 @@ S32 LLSDBinaryFormatter::format_impl(const LLSD& data, std::ostream& ostr,
case LLSD::TypeMap:
{
ostr.put('{');
- U32 size_nbo = htonl(data.size());
+ U32 size_nbo = htonl(static_cast<u_long>(data.size()));
ostr.write((const char*)(&size_nbo), sizeof(U32));
LLSD::map_const_iterator iter = data.beginMap();
LLSD::map_const_iterator end = data.endMap();
@@ -1563,7 +1563,7 @@ S32 LLSDBinaryFormatter::format_impl(const LLSD& data, std::ostream& ostr,
case LLSD::TypeArray:
{
ostr.put('[');
- U32 size_nbo = htonl(data.size());
+ U32 size_nbo = htonl(static_cast<u_long>(data.size()));
ostr.write((const char*)(&size_nbo), sizeof(U32));
LLSD::array_const_iterator iter = data.beginArray();
LLSD::array_const_iterator end = data.endArray();
@@ -1630,7 +1630,7 @@ S32 LLSDBinaryFormatter::format_impl(const LLSD& data, std::ostream& ostr,
{
ostr.put('b');
const std::vector<U8>& buffer = data.asBinary();
- U32 size_nbo = htonl(buffer.size());
+ U32 size_nbo = htonl(static_cast<u_long>(buffer.size()));
ostr.write((const char*)(&size_nbo), sizeof(U32));
if(buffer.size()) ostr.write((const char*)&buffer[0], buffer.size());
break;
@@ -1648,7 +1648,7 @@ void LLSDBinaryFormatter::formatString(
const std::string& string,
std::ostream& ostr) const
{
- U32 size_nbo = htonl(string.size());
+ U32 size_nbo = htonl(static_cast<u_long>(string.size()));
ostr.write((const char*)(&size_nbo), sizeof(U32));
ostr.write(string.c_str(), string.size());
}