Merge remote-tracking branch 'origin/temp/more-patches-53' into ryzomclassic-develop

ryzomclassic-develop
kaetemi 4 years ago
commit ebc220fedb

@ -92,6 +92,11 @@ public:
/// exchange memory data /// exchange memory data
void swap(CMessage &other); void swap(CMessage &other);
#ifdef NL_CPP14
/// Move operator
CMessage &operator=(CMessage &&other) noexcept { swap(other); }
#endif
/// Sets the message type as a string and put it in the buffer if we are in writing mode /// Sets the message type as a string and put it in the buffer if we are in writing mode
void setType (const std::string &name, TMessageType type=OneWay); void setType (const std::string &name, TMessageType type=OneWay);

@ -587,6 +587,8 @@ void CCDBSynchronised::pushDelta( CBitMemStream& s, CCDBStructNodeLeaf *node, ui
uint64 isNull = 1; uint64 isNull = 1;
s.serialAndLog2( isNull, 1 ); s.serialAndLog2( isNull, 1 );
bitsize += 1; bitsize += 1;
if ( VerboseDatabase )
nldebug( "CDB: Pushing permanent value NULL for index %d prop %s", index, node->buildTextId().toString().c_str() );
} }
else else
{ {
@ -639,6 +641,23 @@ void CCDBSynchronised::pushDeltaPermanent( NLMISC::CBitMemStream& s, CCDBStructN
uint64 value; uint64 value;
value = (uint64)_DataContainer.getValue64( index ); // "delta from 0" value = (uint64)_DataContainer.getValue64( index ); // "delta from 0"
if ( node->nullable() && value == 0 )
{
uint64 isNull = 1;
s.serialAndLog2( isNull, 1 );
bitsize += 1;
if ( VerboseDatabase )
nldebug( "CDB: Pushing permanent value NULL for index %d prop %s", index, node->buildTextId().toString().c_str() );
}
else
{
if ( node->nullable() )
{
uint64 isNull = 0;
s.serialAndLog2( isNull, 1 );
bitsize += 1;
}
if ( node->type() == ICDBStructNode::TEXT ) if ( node->type() == ICDBStructNode::TEXT )
{ {
s.serialAndLog2( value, 32 ); s.serialAndLog2( value, 32 );
@ -661,6 +680,7 @@ void CCDBSynchronised::pushDeltaPermanent( NLMISC::CBitMemStream& s, CCDBStructN
nldebug( "CDB: Pushing permanent value %" NL_I64 "d (%u bits) for index %d prop %s", (sint64)value, (uint32)node->type(), index, node->buildTextId().toString().c_str() ); nldebug( "CDB: Pushing permanent value %" NL_I64 "d (%u bits) for index %d prop %s", (sint64)value, (uint32)node->type(), index, node->buildTextId().toString().c_str() );
} }
} }
}
else else
nlwarning("CCDBStructNodeLeaf::writeDeltaPermanent : Property Type Unknown ('%d') -> not serialized.", (uint)node->type()); nlwarning("CCDBStructNodeLeaf::writeDeltaPermanent : Property Type Unknown ('%d') -> not serialized.", (uint)node->type());
} }

Loading…
Cancel
Save