mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
(se)SerializeString: Include max length in the name
This commit clarifies the maximal length of the serialized strings. It will avoid accidental use of serializeString() when a larger string can be expected. Removes unused Wide String serialization functions
This commit is contained in:
parent
ca5c2dbefa
commit
947466ab28
23 changed files with 168 additions and 223 deletions
|
@ -28,7 +28,7 @@ void ParticleParameters::serialize(std::ostream &os, u16 protocol_ver) const
|
|||
writeF32(os, expirationtime);
|
||||
writeF32(os, size);
|
||||
writeU8(os, collisiondetection);
|
||||
os << serializeLongString(texture);
|
||||
os << serializeString32(texture);
|
||||
writeU8(os, vertical);
|
||||
writeU8(os, collision_removal);
|
||||
animation.serialize(os, 6); /* NOT the protocol ver */
|
||||
|
@ -47,7 +47,7 @@ void ParticleParameters::deSerialize(std::istream &is, u16 protocol_ver)
|
|||
expirationtime = readF32(is);
|
||||
size = readF32(is);
|
||||
collisiondetection = readU8(is);
|
||||
texture = deSerializeLongString(is);
|
||||
texture = deSerializeString32(is);
|
||||
vertical = readU8(is);
|
||||
collision_removal = readU8(is);
|
||||
animation.deSerialize(is, 6); /* NOT the protocol ver */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue