2
0
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:
Jack Andersen
2019-07-19 18:27:21 -10:00
parent e38a3ece89
commit 7a3da1f7a6
228 changed files with 2071 additions and 2116 deletions

View File

@@ -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);
}
}