mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 17:58:03 -06:00
Fixed memsetting non-trivially-copyable types
Types stl_stats, stl_normal and SurfaceFillParams should not be zeroed by memset This is not correct and also triggered warnings on gcc
This commit is contained in:
parent
7861fa5086
commit
b67d8c1614
4 changed files with 43 additions and 43 deletions
|
@ -246,7 +246,7 @@ static void extract_model_from_archive(
|
|||
sscanf(normal_buf[2], "%f", &facet.normal(2)) != 1) {
|
||||
// Normal was mangled. Maybe denormals or "not a number" were stored?
|
||||
// Just reset the normal and silently ignore it.
|
||||
memset(&facet.normal, 0, sizeof(facet.normal));
|
||||
facet.normal = stl_normal::Zero();
|
||||
}
|
||||
facets.emplace_back(facet);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue