Fixed naming in dem_stringtables structure
This commit is contained in:
parent
cfc6498c25
commit
7bdbce9aef
@ -58,22 +58,22 @@ static void StringTable_BitRead(bf_read& bitbuf, DemMsg::Dem_StringTables::Strin
|
|||||||
data->tableName.assign(tableName);
|
data->tableName.assign(tableName);
|
||||||
}
|
}
|
||||||
|
|
||||||
data->entries1.reset(bitbuf.ReadWord());
|
data->entries.reset(bitbuf.ReadWord());
|
||||||
for (StringTableEntry& entry : data->entries1)
|
for (StringTableEntry& entry : data->entries)
|
||||||
{
|
{
|
||||||
StringTableEntry_BitRead(bitbuf, &entry);
|
StringTableEntry_BitRead(bitbuf, &entry);
|
||||||
}
|
}
|
||||||
if (bitbuf.ReadOneBit() != 0)
|
if (bitbuf.ReadOneBit() != 0)
|
||||||
{
|
{
|
||||||
data->entries2.reset(bitbuf.ReadWord());
|
data->entriesClientSide.reset(bitbuf.ReadWord());
|
||||||
for (StringTableEntry& entry : data->entries2)
|
for (StringTableEntry& entry : data->entriesClientSide)
|
||||||
{
|
{
|
||||||
StringTableEntry_BitRead(bitbuf, &entry);
|
StringTableEntry_BitRead(bitbuf, &entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
data->entries2.reset(0);
|
data->entriesClientSide.reset(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,18 +82,18 @@ static void StringTable_BitWrite(bf_write& bitbuf, DemMsg::Dem_StringTables::Str
|
|||||||
using StringTableEntry = DemMsg::Dem_StringTables::StringTableEntry;
|
using StringTableEntry = DemMsg::Dem_StringTables::StringTableEntry;
|
||||||
bitbuf.WriteString(data->tableName.c_str());
|
bitbuf.WriteString(data->tableName.c_str());
|
||||||
|
|
||||||
bitbuf.WriteWord(data->entries1.length());
|
bitbuf.WriteWord(data->entries.length());
|
||||||
for (StringTableEntry& entry : data->entries1)
|
for (StringTableEntry& entry : data->entries)
|
||||||
{
|
{
|
||||||
StringTableEntry_BitWrite(bitbuf, &entry);
|
StringTableEntry_BitWrite(bitbuf, &entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
const int32_t entries2Count = data->entries2.length();
|
const int32_t numEntriesClientSide = data->entriesClientSide.length();
|
||||||
bitbuf.WriteOneBit(entries2Count > 0);
|
bitbuf.WriteOneBit(numEntriesClientSide > 0);
|
||||||
if (entries2Count > 0)
|
if (numEntriesClientSide > 0)
|
||||||
{
|
{
|
||||||
bitbuf.WriteWord(entries2Count);
|
bitbuf.WriteWord(numEntriesClientSide);
|
||||||
for (StringTableEntry& entry : data->entries2)
|
for (StringTableEntry& entry : data->entriesClientSide)
|
||||||
{
|
{
|
||||||
StringTableEntry_BitWrite(bitbuf, &entry);
|
StringTableEntry_BitWrite(bitbuf, &entry);
|
||||||
}
|
}
|
||||||
@ -104,7 +104,7 @@ static void StringTable_JsonWrite(JsonWrite& jsonbuf, const DemMsg::Dem_StringTa
|
|||||||
{
|
{
|
||||||
using StringTableEntry = DemMsg::Dem_StringTables::StringTableEntry;
|
using StringTableEntry = DemMsg::Dem_StringTables::StringTableEntry;
|
||||||
jsonbuf.StartArray(data->tableName.c_str());
|
jsonbuf.StartArray(data->tableName.c_str());
|
||||||
for (const StringTableEntry& entry : data->entries1)
|
for (const StringTableEntry& entry : data->entries)
|
||||||
{
|
{
|
||||||
jsonbuf.StartObject();
|
jsonbuf.StartObject();
|
||||||
StringTableEntry_JsonWrite(jsonbuf, &entry);
|
StringTableEntry_JsonWrite(jsonbuf, &entry);
|
||||||
|
@ -22,8 +22,8 @@ namespace DemMsg
|
|||||||
static const int TABLENAME_MAX_LENGTH = 256;
|
static const int TABLENAME_MAX_LENGTH = 256;
|
||||||
|
|
||||||
std::string tableName;
|
std::string tableName;
|
||||||
Array<StringTableEntry> entries1;
|
Array<StringTableEntry> entries;
|
||||||
Array<StringTableEntry> entries2;
|
Array<StringTableEntry> entriesClientSide;
|
||||||
};
|
};
|
||||||
|
|
||||||
Array<StringTable> stringtables;
|
Array<StringTable> stringtables;
|
||||||
|
Loading…
Reference in New Issue
Block a user