mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-03-03 03:23:03 +00:00
refactor: do not nest asset namespaces in game namespaces
* Duplicated namespace names are kind of annoying
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#include <type_traits>
|
||||
|
||||
using namespace IW4;
|
||||
using namespace ::phys_preset;
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -79,14 +78,14 @@ namespace
|
||||
}
|
||||
} // namespace
|
||||
|
||||
namespace IW4::phys_preset
|
||||
namespace phys_preset
|
||||
{
|
||||
bool InfoStringDumper::ShouldDump(XAssetInfo<PhysPreset>* asset)
|
||||
bool InfoStringDumperIW4::ShouldDump(XAssetInfo<IW4::PhysPreset>* asset)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void InfoStringDumper::DumpAsset(AssetDumpingContext& context, XAssetInfo<PhysPreset>* asset)
|
||||
void InfoStringDumperIW4::DumpAsset(AssetDumpingContext& context, XAssetInfo<IW4::PhysPreset>* asset)
|
||||
{
|
||||
// Only dump raw when no gdt available
|
||||
if (context.m_gdt)
|
||||
@@ -109,4 +108,4 @@ namespace IW4::phys_preset
|
||||
stream.write(stringValue.c_str(), stringValue.size());
|
||||
}
|
||||
}
|
||||
} // namespace IW4::phys_preset
|
||||
} // namespace phys_preset
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
#include "Game/IW4/IW4.h"
|
||||
#include "InfoString/InfoString.h"
|
||||
|
||||
namespace IW4::phys_preset
|
||||
namespace phys_preset
|
||||
{
|
||||
class InfoStringDumper final : public AbstractAssetDumper<PhysPreset>
|
||||
class InfoStringDumperIW4 final : public AbstractAssetDumper<IW4::PhysPreset>
|
||||
{
|
||||
protected:
|
||||
bool ShouldDump(XAssetInfo<PhysPreset>* asset) override;
|
||||
void DumpAsset(AssetDumpingContext& context, XAssetInfo<PhysPreset>* asset) override;
|
||||
bool ShouldDump(XAssetInfo<IW4::PhysPreset>* asset) override;
|
||||
void DumpAsset(AssetDumpingContext& context, XAssetInfo<IW4::PhysPreset>* asset) override;
|
||||
};
|
||||
} // namespace IW4::phys_preset
|
||||
} // namespace phys_preset
|
||||
|
||||
Reference in New Issue
Block a user