Remove copy method from drawable

This commit is contained in:
Georg Hagen
2024-07-06 14:08:20 +02:00
parent 7e9c568779
commit c41b04db9b
4 changed files with 2 additions and 9 deletions

View File

@@ -125,10 +125,9 @@ namespace OpenVulkano::Scene
for (auto& drawable : drawables)
{
Scene* drawableScene = drawable->GetScene();
if(drawableScene && drawableScene != scene)
if(drawableScene && drawableScene != scene) [[unlikely]]
{
Logger::SCENE->warn("Drawable is already associated with a scene! Creating copy.");
drawable = drawable->Copy();
throw std::runtime_error("Drawable is already associated with a scene! Creating copy.");
}
drawable->SetScene(scene);
}