diff --git a/libretroshare/src/retroshare/rsidentity.h b/libretroshare/src/retroshare/rsidentity.h index b53c929fc..d9ec9c5a7 100644 --- a/libretroshare/src/retroshare/rsidentity.h +++ b/libretroshare/src/retroshare/rsidentity.h @@ -42,7 +42,7 @@ #include "util/rsdeprecate.h" /* The Main Interface Class - for information about your Peers */ -class RsIdentity; +struct RsIdentity; extern RsIdentity *rsIdentity; @@ -287,7 +287,7 @@ struct RsIdentityUsage : RsSerializable RS_PROCESS_SERIAL_MEMBER(mHash); } - friend class RsTypeSerializer; + friend struct RsTypeSerializer; private: /** Accessible only to friend class RsTypeSerializer needed for * deserialization */ diff --git a/libretroshare/src/serialiser/rstypeserializer.h b/libretroshare/src/serialiser/rstypeserializer.h index 68adacaf7..452700cf2 100644 --- a/libretroshare/src/serialiser/rstypeserializer.h +++ b/libretroshare/src/serialiser/rstypeserializer.h @@ -332,8 +332,8 @@ struct RsTypeSerializer nullptr, 0, RsGenericSerializer::FORMAT_BINARY, RsGenericSerializer::SERIALIZATION_FLAG_NONE, &allocator ); - ok && (kCtx.mJson. - AddMember("key", kvEl["key"], allocator), true); + if(ok) + kCtx.mJson.AddMember("key", kvEl["key"], allocator); T key; ok = ok && (serial_process(j, kCtx, key, "key"), kCtx.mOk); @@ -342,8 +342,8 @@ struct RsTypeSerializer nullptr, 0, RsGenericSerializer::FORMAT_BINARY, RsGenericSerializer::SERIALIZATION_FLAG_NONE, &allocator ); - ok && (vCtx.mJson. - AddMember("value", kvEl["value"], allocator), true); + if(ok) + vCtx.mJson.AddMember("value", kvEl["value"], allocator); U value; ok = ok && ( serial_process(j, vCtx, value, "value"), @@ -752,7 +752,7 @@ bool RsTypeSerializer::from_JSON( const std::string& membername, { rapidjson::Value& v = jVal[mName]; ret = ret && v.IsString(); - ret && (member = t_RsGenericIdType(std::string(v.GetString())), false); + if(ret) member = t_RsGenericIdType(std::string(v.GetString())); } return ret; }