Skip to content

Commit c589702

Browse files
authored
Merge pull request #306 from RobLoach/model-mesh-constructor-delete
Have the Model(mesh) constructor deleted
2 parents 47ebbeb + 473b922 commit c589702

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

include/Model.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ class Model : public ::Model {
4343
Load(mesh);
4444
}
4545

46+
/**
47+
* The Model constructor with a Mesh() is removed.
48+
*
49+
* Use `raylib::MeshUnmanaged` or `::Mesh` instead, as raylib will take ownership of the data.
50+
*
51+
* @see raylib::MeshUnmanaged
52+
*/
53+
Model(const raylib::Mesh& mesh) = delete;
54+
4655
~Model() {
4756
Unload();
4857
}

0 commit comments

Comments
 (0)