From 6aa85ea292a2b97a689a93bd38bc3a0160216354 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Mon, 9 Sep 2019 09:08:00 +0200 Subject: [PATCH] Fix a couple of warning in JSON serializer --- libretroshare/src/serialiser/rstypeserializer.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libretroshare/src/serialiser/rstypeserializer.cc b/libretroshare/src/serialiser/rstypeserializer.cc index a02c58e18..c166ce39c 100644 --- a/libretroshare/src/serialiser/rstypeserializer.cc +++ b/libretroshare/src/serialiser/rstypeserializer.cc @@ -732,11 +732,13 @@ bool RsTypeSerializer::to_JSON( rapidjson::Document::AllocatorType& allocator = jDoc.GetAllocator(); rapidjson::Value key; - key.SetString(memberName.c_str(), memberName.length(), allocator); + key.SetString( memberName.c_str(), + static_cast(memberName.length()), + allocator ); std::string encodedValue; Radix64::encode( reinterpret_cast(member.first), - member.second, encodedValue ); + static_cast(member.second), encodedValue ); rapidjson::Value value; value.SetString(encodedValue.data(), allocator);