get rid of some warnings
This commit is contained in:
committed by
Kueffner, Maximilian
parent
0e1c7deade
commit
c4b82dec6c
+3
-5
@@ -124,10 +124,8 @@ int pixelarium::ui::AppGLFW::Run()
|
|||||||
|
|
||||||
if (ImGui::BeginListBox("ListBox"))
|
if (ImGui::BeginListBox("ListBox"))
|
||||||
{
|
{
|
||||||
pool_.EnumerateResources([](size_t id, const imaging::PixelariumImage& img) -> void
|
pool_.EnumerateResources([](size_t id, const imaging::PixelariumImage&) -> void
|
||||||
{
|
{ ImGui::Selectable(std::format("Image {}", id).c_str()); });
|
||||||
ImGui::Selectable(std::format("Image {}", id).c_str());
|
|
||||||
});
|
|
||||||
|
|
||||||
ImGui::EndListBox();
|
ImGui::EndListBox();
|
||||||
}
|
}
|
||||||
@@ -209,6 +207,6 @@ void pixelarium::ui::AppGLFW::LoadImageProt()
|
|||||||
{
|
{
|
||||||
this->logger_.Debug(std::format("{}: Creating image {}", __FUNCTION__, p));
|
this->logger_.Debug(std::format("{}: Creating image {}", __FUNCTION__, p));
|
||||||
|
|
||||||
image_view_model_->AddImage(std::make_unique<PixelariumImage>(p));
|
last_id = image_view_model_->AddImage(std::make_unique<PixelariumImage>(p));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,17 +102,3 @@ TEST(ImageResourcePoolTest, TemplatedEnumerate)
|
|||||||
EXPECT_NE(std::find(found_ids.begin(), found_ids.end(), id1), found_ids.end());
|
EXPECT_NE(std::find(found_ids.begin(), found_ids.end(), id1), found_ids.end());
|
||||||
EXPECT_NE(std::find(found_ids.begin(), found_ids.end(), id2), found_ids.end());
|
EXPECT_NE(std::find(found_ids.begin(), found_ids.end(), id2), found_ids.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(ImageResourcePoolTest, TemplatedEnumerate)
|
|
||||||
{
|
|
||||||
ImageResourcePool pool;
|
|
||||||
auto id1 = pool.SetResource(std::make_unique<DummyImage>());
|
|
||||||
auto id2 = pool.SetResource(std::make_unique<DummyImage>());
|
|
||||||
std::vector<size_t> found_ids{};
|
|
||||||
|
|
||||||
pool.Enumerate([&found_ids](size_t id, const pixelarium::imaging::PixelariumImage& img) { found_ids.push_back(id); });
|
|
||||||
|
|
||||||
EXPECT_EQ(found_ids.size(), 2);
|
|
||||||
EXPECT_NE(std::find(found_ids.begin(), found_ids.end(), id1), found_ids.end());
|
|
||||||
EXPECT_NE(std::find(found_ids.begin(), found_ids.end(), id2), found_ids.end());
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user