Use the logging system instead of std::cout in components/esm4

- Remove debug-related includes
- Add some trivial missing includes
- Remove useless {}
- Move the known-but-skipped-records are the end of the switch-cases
- Always throw on unknown records
This commit is contained in:
jvoisin 2023-05-30 19:49:03 +02:00
parent 8e3e351015
commit a58dc6fd30
87 changed files with 355 additions and 560 deletions

View file

@ -27,7 +27,8 @@
#include "loadmstt.hpp"
#include <stdexcept>
//#include <iostream> // FIXME: testing only
#include <components/debug/debuglog.hpp>
#include "reader.hpp"
//#include "writer.hpp"
@ -65,11 +66,9 @@ void ESM4::MovableStatic::load(ESM4::Reader& reader)
case ESM4::SUB_MODS:
case ESM4::SUB_FULL:
case ESM4::SUB_MODB:
{
// std::cout << "MSTT " << ESM::printName(subHdr.typeId) << " skipping..." << std::endl;
Log(Debug::Verbose) << "MSTT " << ESM::printName(subHdr.typeId) << " skipping...";
reader.skipSubRecordData();
break;
}
default:
throw std::runtime_error("ESM4::MSTT::load - Unknown subrecord " + ESM::printName(subHdr.typeId));
}