Fix some warnings

This commit is contained in:
Gioacchino Mazzurco 2018-01-22 14:50:07 +01:00
parent 04d32d2f44
commit 9c68bcbca4
2 changed files with 7 additions and 7 deletions

View File

@ -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 */

View File

@ -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<ID_SIZE_IN_BYTES,UPPER_CASE,UNIQUE_IDENTIFIER>(std::string(v.GetString())), false);
if(ret) member = t_RsGenericIdType<ID_SIZE_IN_BYTES,UPPER_CASE,UNIQUE_IDENTIFIER>(std::string(v.GetString()));
}
return ret;
}