2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-07-04 10:11:53 +00:00

Use escaped strings with simple lexer whenever appropriate

This commit is contained in:
Jan
2023-09-23 15:21:09 +02:00
parent 88bc1c1056
commit 2cd5d05a19
11 changed files with 22 additions and 41 deletions

View File

@ -4,6 +4,7 @@
#include <sstream>
#include "Utils/Alignment.h"
#include "Utils/StringUtils.h"
StructuredDataDefDumper::StructuredDataDefDumper(std::ostream& stream)
: AbstractTextDumper(stream),
@ -37,7 +38,9 @@ void StructuredDataDefDumper::DumpEnum(const CommonStructuredDataEnum& _enum)
for (auto i = 0u; i < entryCount; i++)
{
Indent();
m_stream << "\"" << _enum.m_entries[i].m_name << "\"";
m_stream << "\"";
utils::EscapeStringForQuotationMarks(m_stream, _enum.m_entries[i].m_name);
m_stream << "\"";
if (i + 1 < entryCount)
m_stream << ",";