From 473b922da17ded432b1c0996f0196e0a4b9e9ab1 Mon Sep 17 00:00:00 2001 From: Rob Loach Date: Sat, 9 Mar 2024 18:08:14 -0500 Subject: [PATCH] Have the Model(mesh) constructor deleted --- include/Model.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/Model.hpp b/include/Model.hpp index a2e1cf97..d9b7c158 100644 --- a/include/Model.hpp +++ b/include/Model.hpp @@ -43,6 +43,15 @@ class Model : public ::Model { Load(mesh); } + /** + * The Model constructor with a Mesh() is removed. + * + * Use `raylib::MeshUnmanaged` or `::Mesh` instead, as raylib will take ownership of the data. + * + * @see raylib::MeshUnmanaged + */ + Model(const raylib::Mesh& mesh) = delete; + ~Model() { Unload(); }