Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Philip Trettner
polymesh
Commits
a2f1e9d8
Commit
a2f1e9d8
authored
Mar 10, 2020
by
Philip Trettner
Browse files
security check
parent
cd4589aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/polymesh/formats.hh
View file @
a2f1e9d8
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment