mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 19:12:17 +00: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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user