2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 07:07:42 +00:00

Function-scope statics aren't as efficient as file-scope ones

This commit is contained in:
Jack Andersen
2016-04-14 17:26:01 -10:00
parent c91bfade75
commit 86c21a77ac
12 changed files with 70 additions and 66 deletions

View File

@@ -40,6 +40,11 @@ SpecBase::SpecBase(const hecl::Database::DataSpecEntry* specEntry, hecl::Databas
DataSpec::UniqueIDBridge::setGlobalProject(m_project);
}
static const hecl::SystemString regNONE = _S("");
static const hecl::SystemString regE = _S("NTSC");
static const hecl::SystemString regJ = _S("NTSC-J");
static const hecl::SystemString regP = _S("PAL");
bool SpecBase::canExtract(const ExtractPassInfo& info, std::vector<ExtractReport>& reps)
{
m_disc = nod::OpenDiscFromImage(info.srcpath.c_str(), m_isWii);
@@ -67,10 +72,6 @@ bool SpecBase::canExtract(const ExtractPassInfo& info, std::vector<ExtractReport
return false;
char region = m_disc->getHeader().m_gameID[3];
static const hecl::SystemString regNONE = _S("");
static const hecl::SystemString regE = _S("NTSC");
static const hecl::SystemString regJ = _S("NTSC-J");
static const hecl::SystemString regP = _S("PAL");
const hecl::SystemString* regstr = &regNONE;
switch (region)
{