chore: fix build

This commit is contained in:
Jan 2024-10-05 12:56:14 +02:00
parent 1861bd689c
commit 1a7d2cf1a2
No known key found for this signature in database
GPG Key ID: 44B581F78FF5C57C

View File

@ -1,5 +1,8 @@
#include "ContentPrinter.h" #include "ContentPrinter.h"
#include <format>
#include <iostream>
ContentPrinter::ContentPrinter(Zone* zone) ContentPrinter::ContentPrinter(Zone* zone)
{ {
m_zone = zone; m_zone = zone;
@ -8,13 +11,11 @@ ContentPrinter::ContentPrinter(Zone* zone)
void ContentPrinter::PrintContent() const void ContentPrinter::PrintContent() const
{ {
const auto* pools = m_zone->m_pools.get(); const auto* pools = m_zone->m_pools.get();
printf("Zone '%s' (%s)\n", m_zone->m_name.c_str(), m_zone->m_game->GetShortName().c_str()); std::cout << std::format("Zone '{}' ({})\n", m_zone->m_name, m_zone->m_game->GetShortName());
puts("Content:"); std::cout << "Content:\n";
for (const auto& asset : *pools) for (const auto& asset : *pools)
{ std::cout << std::format("{}, {}\n", *pools->GetAssetTypeName(asset->m_type), asset->m_name);
printf("%s, %s\n", pools->GetAssetTypeName(asset->m_type), asset->m_name.c_str());
}
puts(""); std::cout << "\n";
} }