mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 12:24:56 +00:00
Code style improvements
This commit is contained in:
@@ -26,7 +26,7 @@ public:
|
||||
for (const hecl::SystemString& arg : info.args) {
|
||||
if (arg.empty())
|
||||
continue;
|
||||
else if (!arg.compare(_SYS_STR("--fast"))) {
|
||||
else if (arg == _SYS_STR("--fast")) {
|
||||
m_fast = true;
|
||||
continue;
|
||||
} else if (arg.size() >= 8 && !arg.compare(0, 7, _SYS_STR("--spec="))) {
|
||||
|
||||
@@ -20,15 +20,10 @@ class ToolPackage final : public ToolBase {
|
||||
}
|
||||
|
||||
void CheckFile(const hecl::ProjectPath& path) {
|
||||
if (!hecl::StrCmp(path.getLastComponent().data(), _SYS_STR("!world.blend")))
|
||||
auto lastComp = path.getLastComponent();
|
||||
if (hecl::StringUtils::BeginsWith(lastComp, _SYS_STR("!world_")) &&
|
||||
hecl::StringUtils::EndsWith(lastComp, _SYS_STR(".blend")))
|
||||
AddSelectedItem(path);
|
||||
#if RUNTIME_ORIGINAL_IDS
|
||||
else if (!hecl::StrCmp(path.getLastComponent().data(), _SYS_STR("!original_ids.yaml"))) {
|
||||
auto pathComps = path.getPathComponents();
|
||||
if (pathComps.size() == 2 && pathComps[0] != _SYS_STR("out"))
|
||||
AddSelectedItem(path);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void FindSelectedItems(const hecl::ProjectPath& path, bool checkGeneral) {
|
||||
@@ -70,7 +65,7 @@ public:
|
||||
for (const hecl::SystemString& arg : info.args) {
|
||||
if (arg.empty())
|
||||
continue;
|
||||
else if (!arg.compare(_SYS_STR("--fast"))) {
|
||||
else if (arg == _SYS_STR("--fast")) {
|
||||
m_fast = true;
|
||||
continue;
|
||||
} else if (arg.size() >= 8 && !arg.compare(0, 7, _SYS_STR("--spec="))) {
|
||||
|
||||
@@ -19,9 +19,9 @@ public:
|
||||
hecl::SystemString firstArg = info.args.front();
|
||||
hecl::ToLower(firstArg);
|
||||
|
||||
if (!firstArg.compare(_SYS_STR("enable")))
|
||||
if (firstArg == _SYS_STR("enable"))
|
||||
mode = MENABLE;
|
||||
else if (!firstArg.compare(_SYS_STR("disable")))
|
||||
else if (firstArg == _SYS_STR("disable"))
|
||||
mode = MDISABLE;
|
||||
else
|
||||
return;
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
for (auto& spec : specs) {
|
||||
hecl::SystemString compName(spec.spec.m_name);
|
||||
hecl::ToLower(compName);
|
||||
if (!itName.compare(compName)) {
|
||||
if (itName == compName) {
|
||||
opSpecs.emplace_back(spec.spec.m_name);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user