2
0
mirror of https://github.com/Laupetin/OpenAssetTools.git synced 2026-05-02 00:19:35 +00:00

feat: report on unlinking progress

This commit is contained in:
Jan Laupetin
2025-10-14 23:20:56 +01:00
parent 9fa41ca0d3
commit c6e9cbedda
159 changed files with 686 additions and 802 deletions
+3 -3
View File
@@ -12,10 +12,10 @@ namespace
{
constexpr double MIN_PROGRESS_TO_REPORT = 0.005;
class EventProgressReporter : public ProgressCallback
class LoadingEventProgressReporter : public ProgressCallback
{
public:
explicit EventProgressReporter(std::string zoneName)
explicit LoadingEventProgressReporter(std::string zoneName)
: m_zone_name(std::move(zoneName)),
m_last_progress(0)
{
@@ -46,7 +46,7 @@ void FastFileContext::Destroy()
result::Expected<Zone*, std::string> FastFileContext::LoadFastFile(const std::string& path)
{
auto zone = ZoneLoading::LoadZone(path, std::make_unique<EventProgressReporter>(fs::path(path).filename().replace_extension().string()));
auto zone = ZoneLoading::LoadZone(path, std::make_unique<LoadingEventProgressReporter>(fs::path(path).filename().replace_extension().string()));
if (!zone)
return result::Unexpected(std::move(zone.error()));