From 833b158a64d009012a1491c7492423bade7a837a Mon Sep 17 00:00:00 2001 From: Jan Date: Sun, 20 Mar 2022 19:35:52 +0100 Subject: [PATCH] Rename new StructuredDataDefDumper --- .../AssetDumperStructuredDataDefSet.cpp | 4 ++-- .../StructuredDataDef/StructuredDataDefDumper.cpp | 14 +++++++------- .../StructuredDataDef/StructuredDataDefDumper.h | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/ObjWriting/Game/IW4/AssetDumpers/AssetDumperStructuredDataDefSet.cpp b/src/ObjWriting/Game/IW4/AssetDumpers/AssetDumperStructuredDataDefSet.cpp index fe131137..fca40a49 100644 --- a/src/ObjWriting/Game/IW4/AssetDumpers/AssetDumperStructuredDataDefSet.cpp +++ b/src/ObjWriting/Game/IW4/AssetDumpers/AssetDumperStructuredDataDefSet.cpp @@ -189,10 +189,10 @@ void AssetDumperStructuredDataDefSet::DumpAsset(AssetDumpingContext& context, XA if (!assetFile || set->defs == nullptr) return; - StructuredDataDefDumperNew newDumper(*assetFile); + StructuredDataDefDumper dumper(*assetFile); for (auto i = 0u; i < set->defCount; i++) { const auto def = ConvertDef(&set->defs[i]); - newDumper.DumpDef(*def); + dumper.DumpDef(*def); } } diff --git a/src/ObjWriting/StructuredDataDef/StructuredDataDefDumper.cpp b/src/ObjWriting/StructuredDataDef/StructuredDataDefDumper.cpp index 0cbe5fcc..823a0862 100644 --- a/src/ObjWriting/StructuredDataDef/StructuredDataDefDumper.cpp +++ b/src/ObjWriting/StructuredDataDef/StructuredDataDefDumper.cpp @@ -5,19 +5,19 @@ #include "Utils/Alignment.h" -StructuredDataDefDumperNew::StructuredDataDefDumperNew(std::ostream& stream) +StructuredDataDefDumper::StructuredDataDefDumper(std::ostream& stream) : AbstractTextDumper(stream), m_flags{} { } -void StructuredDataDefDumperNew::WriteLineComment(const std::string& comment) const +void StructuredDataDefDumper::WriteLineComment(const std::string& comment) const { Indent(); m_stream << "// " << comment << "\n"; } -void StructuredDataDefDumperNew::DumpEnum(const CommonStructuredDataEnum& _enum) +void StructuredDataDefDumper::DumpEnum(const CommonStructuredDataEnum& _enum) { Indent(); @@ -49,7 +49,7 @@ void StructuredDataDefDumperNew::DumpEnum(const CommonStructuredDataEnum& _enum) m_stream << "};\n"; // end enum } -void StructuredDataDefDumperNew::DumpType(const CommonStructuredDataDef& def, CommonStructuredDataType type, std::string& typeName, std::vector& arraySpecifiers) const +void StructuredDataDefDumper::DumpType(const CommonStructuredDataDef& def, CommonStructuredDataType type, std::string& typeName, std::vector& arraySpecifiers) const { while (type.m_category != CommonStructuredDataTypeCategory::UNKNOWN) { @@ -131,7 +131,7 @@ void StructuredDataDefDumperNew::DumpType(const CommonStructuredDataDef& def, Co } } -void StructuredDataDefDumperNew::DumpProperty(const CommonStructuredDataDef& def, const CommonStructuredDataStructProperty& property, unsigned& currentOffsetInBit) const +void StructuredDataDefDumper::DumpProperty(const CommonStructuredDataDef& def, const CommonStructuredDataStructProperty& property, unsigned& currentOffsetInBit) const { std::string typeName; std::vector arraySpecifiers; @@ -178,7 +178,7 @@ void StructuredDataDefDumperNew::DumpProperty(const CommonStructuredDataDef& def currentOffsetInBit += property.m_type.GetSizeInBits(def); } -void StructuredDataDefDumperNew::DumpStruct(const CommonStructuredDataDef& def, const CommonStructuredDataStruct& _struct, const size_t structIndex) +void StructuredDataDefDumper::DumpStruct(const CommonStructuredDataDef& def, const CommonStructuredDataStruct& _struct, const size_t structIndex) { #ifdef STRUCTUREDDATADEF_DEBUG Indent(); @@ -212,7 +212,7 @@ void StructuredDataDefDumperNew::DumpStruct(const CommonStructuredDataDef& def, m_stream << "};\n"; // end struct } -void StructuredDataDefDumperNew::DumpDef(const CommonStructuredDataDef& def) +void StructuredDataDefDumper::DumpDef(const CommonStructuredDataDef& def) { if (m_flags.m_empty_line_before_definition) m_stream << "\n\n"; diff --git a/src/ObjWriting/StructuredDataDef/StructuredDataDefDumper.h b/src/ObjWriting/StructuredDataDef/StructuredDataDefDumper.h index 7955d85d..5195f223 100644 --- a/src/ObjWriting/StructuredDataDef/StructuredDataDefDumper.h +++ b/src/ObjWriting/StructuredDataDef/StructuredDataDefDumper.h @@ -6,7 +6,7 @@ #include "Dumping/AbstractTextDumper.h" #include "StructuredDataDef/CommonStructuredDataDef.h" -class StructuredDataDefDumperNew : AbstractTextDumper +class StructuredDataDefDumper : AbstractTextDumper { struct { @@ -21,7 +21,7 @@ class StructuredDataDefDumperNew : AbstractTextDumper void DumpStruct(const CommonStructuredDataDef& def, const CommonStructuredDataStruct& _struct, size_t structIndex); public: - explicit StructuredDataDefDumperNew(std::ostream& stream); + explicit StructuredDataDefDumper(std::ostream& stream); void DumpDef(const CommonStructuredDataDef& def); };