mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 22:27:43 +00:00
Massive fmtlib refactor
This commit is contained in:
@@ -16,7 +16,7 @@ template <class IDType>
|
||||
void GPSM<IDType>::_read(typename ReadYaml::StreamT& r) {
|
||||
for (const auto& elem : r.getCurNode()->m_mapChildren) {
|
||||
if (elem.first.size() < 4) {
|
||||
LogModule.report(logvisor::Warning, "short FourCC in element '%s'", elem.first.c_str());
|
||||
LogModule.report(logvisor::Warning, fmt("short FourCC in element '{}'"), elem.first);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -793,15 +793,15 @@ void GPSM<IDType>::_binarySize(typename BinarySize::StreamT& s) const {
|
||||
|
||||
template <class IDType>
|
||||
void GPSM<IDType>::_read(typename Read::StreamT& r) {
|
||||
uint32_t clsId;
|
||||
r.readBytesToBuf(&clsId, 4);
|
||||
DNAFourCC clsId;
|
||||
clsId.read(r);
|
||||
if (clsId != SBIG('GPSM')) {
|
||||
LogModule.report(logvisor::Warning, "non GPSM provided to GPSM parser");
|
||||
LogModule.report(logvisor::Warning, fmt("non GPSM provided to GPSM parser"));
|
||||
return;
|
||||
}
|
||||
r.readBytesToBuf(&clsId, 4);
|
||||
clsId.read(r);
|
||||
while (clsId != SBIG('_END')) {
|
||||
switch (clsId) {
|
||||
switch (clsId.toUint32()) {
|
||||
case SBIG('PMCL'):
|
||||
x78_PMCL.read(r);
|
||||
break;
|
||||
@@ -1064,10 +1064,10 @@ void GPSM<IDType>::_read(typename Read::StreamT& r) {
|
||||
xd8_SELC.read(r);
|
||||
break;
|
||||
default:
|
||||
LogModule.report(logvisor::Fatal, "Unknown GPSM class %.4s @%" PRIi64, &clsId, r.position());
|
||||
LogModule.report(logvisor::Fatal, fmt("Unknown GPSM class {} @{}"), clsId, r.position());
|
||||
break;
|
||||
}
|
||||
r.readBytesToBuf(&clsId, 4);
|
||||
clsId.read(r);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user