2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2025-09-12 11:37:27 +00:00

chore: update code style in ZoneCodeGenerator entrypoint

This commit is contained in:
Jan
2025-04-19 15:58:00 +02:00
parent 0f3ee1fa79
commit 785cf8c025
5 changed files with 76 additions and 91 deletions

View File

@@ -93,18 +93,24 @@ const CommandLineOption* const COMMAND_LINE_OPTIONS[]{
OPTION_GENERATE,
};
ZoneCodeGeneratorArguments::GenerationTask::GenerationTask()
namespace
{
static constexpr unsigned FLAG_TASK_GENERATE = 1 << 0;
static constexpr unsigned FLAG_TASK_PRINT = 1 << 1;
} // namespace
GenerationTask::GenerationTask()
: m_all_assets(false)
{
}
ZoneCodeGeneratorArguments::GenerationTask::GenerationTask(std::string templateName)
GenerationTask::GenerationTask(std::string templateName)
: m_all_assets(true),
m_template_name(std::move(templateName))
{
}
ZoneCodeGeneratorArguments::GenerationTask::GenerationTask(std::string assetName, std::string templateName)
GenerationTask::GenerationTask(std::string assetName, std::string templateName)
: m_all_assets(false),
m_asset_name(std::move(assetName)),
m_template_name(std::move(templateName))
@@ -113,7 +119,7 @@ ZoneCodeGeneratorArguments::GenerationTask::GenerationTask(std::string assetName
ZoneCodeGeneratorArguments::ZoneCodeGeneratorArguments()
: m_argument_parser(COMMAND_LINE_OPTIONS, std::extent_v<decltype(COMMAND_LINE_OPTIONS)>),
m_task_flags(0)
m_task_flags(0u)
{
m_verbose = false;
}
@@ -123,9 +129,7 @@ void ZoneCodeGeneratorArguments::PrintUsage() const
UsageInformation usage(m_argument_parser.GetExecutableName());
for (const auto* commandLineOption : COMMAND_LINE_OPTIONS)
{
usage.AddCommandLineOption(commandLineOption);
}
usage.Print();
}