Added WriteChar func to JsonWriterFile
This commit is contained in:
parent
236919cc4c
commit
e959fb0334
@ -84,6 +84,15 @@ namespace base
|
|||||||
writer.Bool(value);
|
writer.Bool(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void JsonWriterFile::WriteChar(const char* name, char value)
|
||||||
|
{
|
||||||
|
auto& writer = m_writer;
|
||||||
|
writer.String(name);
|
||||||
|
|
||||||
|
char temp[2] = { value, '\0' };
|
||||||
|
writer.String(temp);
|
||||||
|
}
|
||||||
|
|
||||||
void JsonWriterFile::WriteInt32(const char* name, std::int32_t value)
|
void JsonWriterFile::WriteInt32(const char* name, std::int32_t value)
|
||||||
{
|
{
|
||||||
auto& writer = m_writer;
|
auto& writer = m_writer;
|
||||||
|
@ -28,6 +28,7 @@ namespace base
|
|||||||
|
|
||||||
void WriteNull(const char* name);
|
void WriteNull(const char* name);
|
||||||
void WriteBool(const char* name, bool value);
|
void WriteBool(const char* name, bool value);
|
||||||
|
void WriteChar(const char* name, char value);
|
||||||
void WriteInt32(const char* name, std::int32_t value);
|
void WriteInt32(const char* name, std::int32_t value);
|
||||||
void WriteInt32(const char* name, std::int32_t value, bool writeCondition);
|
void WriteInt32(const char* name, std::int32_t value, bool writeCondition);
|
||||||
void WriteInt64(const char* name, std::int64_t value);
|
void WriteInt64(const char* name, std::int64_t value);
|
||||||
|
@ -92,7 +92,7 @@ namespace NetHandlers
|
|||||||
jsonbuf.WriteUInt32("playerSlot", data->playerSlot);
|
jsonbuf.WriteUInt32("playerSlot", data->playerSlot);
|
||||||
jsonbuf.WriteUInt32("maxClients", data->maxClients);
|
jsonbuf.WriteUInt32("maxClients", data->maxClients);
|
||||||
jsonbuf.WriteFloat("tickInterval", data->tickInterval);
|
jsonbuf.WriteFloat("tickInterval", data->tickInterval);
|
||||||
jsonbuf.WriteString("os", &data->os, 1);
|
jsonbuf.WriteChar("os", data->os);
|
||||||
jsonbuf.WriteString("gameDir", data->gameDir);
|
jsonbuf.WriteString("gameDir", data->gameDir);
|
||||||
jsonbuf.WriteString("mapName", data->mapName);
|
jsonbuf.WriteString("mapName", data->mapName);
|
||||||
jsonbuf.WriteString("skyName", data->skyName);
|
jsonbuf.WriteString("skyName", data->skyName);
|
||||||
|
Loading…
Reference in New Issue
Block a user