From ead5f5ae060759bce3fd1dacda52345185f9a1a5 Mon Sep 17 00:00:00 2001 From: m-aXimilian Date: Mon, 16 Jun 2025 13:19:28 +0200 Subject: [PATCH] init view abstractions --- src/AppGLFW.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/AppGLFW.cpp b/src/AppGLFW.cpp index e5f2da0..eac56b0 100644 --- a/src/AppGLFW.cpp +++ b/src/AppGLFW.cpp @@ -124,8 +124,10 @@ int pixelarium::ui::AppGLFW::Run() if (ImGui::BeginListBox("ListBox")) { - pool_.EnumerateResources([](size_t id, const imaging::PixelariumImage&) -> void - { ImGui::Selectable(std::format("Image {}", id).c_str()); }); + pool_.EnumerateResources([](size_t id, const imaging::PixelariumImage& img) -> void + { + ImGui::Selectable(std::format("Image {}", id).c_str()); + }); ImGui::EndListBox(); } @@ -207,6 +209,6 @@ void pixelarium::ui::AppGLFW::LoadImageProt() { this->logger_.Debug(std::format("{}: Creating image {}", __FUNCTION__, p)); - last_id = image_view_model_->AddImage(std::make_unique(p)); + image_view_model_->AddImage(std::move(std::make_unique(p))); } }