mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-14 08:47:57 -05:00
refactor: use OutputPathFilesystem for writing fastfiles
This commit is contained in:
@ -6,16 +6,16 @@
|
||||
#include <format>
|
||||
#include <iostream>
|
||||
|
||||
bool ZoneWriting::WriteZone(std::ostream& stream, Zone* zone)
|
||||
bool ZoneWriting::WriteZone(std::ostream& stream, const Zone& zone)
|
||||
{
|
||||
const auto start = std::chrono::high_resolution_clock::now();
|
||||
|
||||
const auto factory = IZoneWriterFactory::GetZoneWriterFactoryForGame(zone->m_game->GetId());
|
||||
const auto factory = IZoneWriterFactory::GetZoneWriterFactoryForGame(zone.m_game->GetId());
|
||||
|
||||
const auto zoneWriter = factory->CreateWriter(zone);
|
||||
if (zoneWriter == nullptr)
|
||||
{
|
||||
std::cerr << std::format("Could not create ZoneWriter for zone \"{}\".\n", zone->m_name);
|
||||
std::cerr << std::format("Could not create ZoneWriter for zone \"{}\".\n", zone.m_name);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ bool ZoneWriting::WriteZone(std::ostream& stream, Zone* zone)
|
||||
|
||||
const auto end = std::chrono::high_resolution_clock::now();
|
||||
|
||||
std::cout << std::format("Writing zone \"{}\" took {} ms.\n", zone->m_name, std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count());
|
||||
std::cout << std::format("Writing zone \"{}\" took {} ms.\n", zone.m_name, std::chrono::duration_cast<std::chrono::milliseconds>(end - start).count());
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user