Commit a2f1e9d8 authored by Philip Trettner's avatar Philip Trettner
Browse files

security check

parent cd4589aa
......@@ -45,6 +45,7 @@ template <class Pos3>
bool load(std::string const& filename, Mesh& m, vertex_attribute<Pos3>& pos)
{
static_assert(sizeof(Pos3) == sizeof(float) * 3 || sizeof(Pos3) == sizeof(double) * 3, "position type must be 3 floats or 3 doubles");
POLYMESH_ASSERT(&m == &pos.mesh() && "wrong mesh");
bool ok;
if (sizeof(Pos3) == sizeof(float) * 3)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment