Skip to content

Commit

Permalink
Have the Model(mesh) constructor deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
RobLoach committed Mar 9, 2024
1 parent 9176e0a commit 473b922
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/Model.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 473b922

Please sign in to comment.