mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 01:25:20 +02: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:
@@ -39,7 +39,7 @@ struct SimpleSoundSpec
|
||||
// keep in sync with item definitions
|
||||
void serialize(std::ostream &os, u8 cf_version) const
|
||||
{
|
||||
os << serializeString(name);
|
||||
os << serializeString16(name);
|
||||
writeF32(os, gain);
|
||||
writeF32(os, pitch);
|
||||
writeF32(os, fade);
|
||||
@@ -49,7 +49,7 @@ struct SimpleSoundSpec
|
||||
|
||||
void deSerialize(std::istream &is, u8 cf_version)
|
||||
{
|
||||
name = deSerializeString(is);
|
||||
name = deSerializeString16(is);
|
||||
gain = readF32(is);
|
||||
pitch = readF32(is);
|
||||
fade = readF32(is);
|
||||
|
Reference in New Issue
Block a user