mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 13:44:56 +00:00
string_view refactor
This commit is contained in:
@@ -51,8 +51,8 @@ public:
|
||||
LogModule.report(logvisor::Fatal,
|
||||
_S("hecl cook can only process multiple items in the same project; ")
|
||||
_S("'%s' and '%s' are different projects"),
|
||||
m_fallbackProj->getProjectRootPath().getAbsolutePath().c_str(),
|
||||
root.getAbsolutePath().c_str());
|
||||
m_fallbackProj->getProjectRootPath().getAbsolutePath().data(),
|
||||
root.getAbsolutePath().data());
|
||||
m_selectedItems.emplace_back(*m_useProj, subPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,9 +159,9 @@ public:
|
||||
for (SpecExtractPass& ds : m_specPasses)
|
||||
{
|
||||
if (XTERM_COLOR)
|
||||
hecl::Printf(_S("" MAGENTA BOLD "Using DataSpec %s:" NORMAL "\n"), ds.m_entry->m_name);
|
||||
hecl::Printf(_S("" MAGENTA BOLD "Using DataSpec %s:" NORMAL "\n"), ds.m_entry->m_name.data());
|
||||
else
|
||||
hecl::Printf(_S("Using DataSpec %s:\n"), ds.m_entry->m_name);
|
||||
hecl::Printf(_S("Using DataSpec %s:\n"), ds.m_entry->m_name.data());
|
||||
|
||||
int lineIdx = 0;
|
||||
ds.m_instance->doExtract(m_einfo,
|
||||
|
||||
@@ -23,9 +23,9 @@ class ToolPackage final : public ToolBase
|
||||
|
||||
void CheckFile(const hecl::ProjectPath& path)
|
||||
{
|
||||
if (!hecl::StrCmp(path.getLastComponent(), _S("!world.blend")))
|
||||
if (!hecl::StrCmp(path.getLastComponent().data(), _S("!world.blend")))
|
||||
AddSelectedItem(path);
|
||||
else if (!hecl::StrCmp(path.getLastComponent(), _S("!original_ids.yaml")))
|
||||
else if (!hecl::StrCmp(path.getLastComponent().data(), _S("!original_ids.yaml")))
|
||||
{
|
||||
auto pathComps = path.getPathComponents();
|
||||
if (pathComps.size() == 2 && pathComps[0] != _S("out"))
|
||||
@@ -100,8 +100,8 @@ public:
|
||||
LogModule.report(logvisor::Fatal,
|
||||
_S("hecl package can only process multiple items in the same project; ")
|
||||
_S("'%s' and '%s' are different projects"),
|
||||
m_fallbackProj->getProjectRootPath().getAbsolutePath().c_str(),
|
||||
root.getAbsolutePath().c_str());
|
||||
m_fallbackProj->getProjectRootPath().getAbsolutePath().data(),
|
||||
root.getAbsolutePath().data());
|
||||
|
||||
FindSelectedItems({*m_useProj, subPath}, true);
|
||||
}
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
hecl::Printf(_S("ABOUT TO PACKAGE:\n"));
|
||||
|
||||
for (auto& item : m_selectedItems)
|
||||
hecl::Printf(_S("%s\n"), item.getRelativePath().c_str());
|
||||
hecl::Printf(_S("%s\n"), item.getRelativePath().data());
|
||||
|
||||
if (continuePrompt())
|
||||
{
|
||||
@@ -180,7 +180,7 @@ public:
|
||||
for (const hecl::ProjectPath& path : m_selectedItems)
|
||||
{
|
||||
if (!m_useProj->packagePath(path, {}, m_fast, &cp))
|
||||
LogModule.report(logvisor::Error, _S("Unable to package %s"), path.getAbsolutePath().c_str());
|
||||
LogModule.report(logvisor::Error, _S("Unable to package %s"), path.getAbsolutePath().data());
|
||||
}
|
||||
cp.waitUntilComplete();
|
||||
}
|
||||
|
||||
@@ -95,10 +95,10 @@ public:
|
||||
for (const hecl::Database::DataSpecEntry* spec : hecl::Database::DATA_SPEC_REGISTRY)
|
||||
{
|
||||
if (XTERM_COLOR)
|
||||
hecl::Printf(_S("" BOLD CYAN "%s" NORMAL "\n"), spec->m_name);
|
||||
hecl::Printf(_S("" BOLD CYAN "%s" NORMAL "\n"), spec->m_name.data());
|
||||
else
|
||||
hecl::Printf(_S("%s\n"), spec->m_name);
|
||||
hecl::Printf(_S(" %s\n"), spec->m_desc);
|
||||
hecl::Printf(_S("%s\n"), spec->m_name.data());
|
||||
hecl::Printf(_S(" %s\n"), spec->m_desc.data());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -109,9 +109,9 @@ public:
|
||||
for (auto& spec : specs)
|
||||
{
|
||||
if (XTERM_COLOR)
|
||||
hecl::Printf(_S("" BOLD CYAN "%s" NORMAL ""), spec.spec.m_name);
|
||||
hecl::Printf(_S("" BOLD CYAN "%s" NORMAL ""), spec.spec.m_name.data());
|
||||
else
|
||||
hecl::Printf(_S("%s"), spec.spec.m_name);
|
||||
hecl::Printf(_S("%s"), spec.spec.m_name.data());
|
||||
if (spec.active)
|
||||
{
|
||||
if (XTERM_COLOR)
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
else
|
||||
hecl::Printf(_S(" [ENABLED]"));
|
||||
}
|
||||
hecl::Printf(_S("\n %s\n"), spec.spec.m_desc);
|
||||
hecl::Printf(_S("\n %s\n"), spec.spec.m_desc.data());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
hecl::ToLower(compName);
|
||||
if (!itName.compare(compName))
|
||||
{
|
||||
opSpecs.push_back(spec.spec.m_name);
|
||||
opSpecs.emplace_back(spec.spec.m_name);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user