fix a not-the-same-meaning replacement

This commit is contained in:
supermerill 2018-11-29 19:14:35 +01:00
parent 77e4d70420
commit 90b1cb7391

View File

@ -169,7 +169,7 @@ LayerRegion::process_external_surfaces()
fill_boundaries = SurfaceCollection(surfaces);
} else {
for (const Surface &s : surfaces)
if (s.is_external())
if (s.surface_type != stInternal)
fill_boundaries.surfaces.push_back(s);
}
@ -238,7 +238,7 @@ LayerRegion::prepare_fill_surfaces()
// if no solid layers are requested, turn top/bottom surfaces to internal
if (this->region()->config.top_solid_layers == 0 && this->region()->config.min_top_bottom_shell_thickness <= 0) {
for (Surfaces::iterator surface = this->fill_surfaces.surfaces.begin(); surface != this->fill_surfaces.surfaces.end(); ++surface) {
for (Surface &surface : this->fill_surfaces.surfaces) {
if (surface->surface_type == stTop) {
if (this->layer()->object()->config.infill_only_where_needed) {
surface->surface_type = (stInternal | stVoid);
@ -250,7 +250,7 @@ LayerRegion::prepare_fill_surfaces()
}
if (this->region()->config.bottom_solid_layers == 0 && this->region()->config.min_top_bottom_shell_thickness <= 0) {
for (Surfaces::iterator surface = this->fill_surfaces.surfaces.begin(); surface != this->fill_surfaces.surfaces.end(); ++surface) {
for (Surface &surface : this->fill_surfaces.surfaces) {
if (surface->is_bottom())
surface->surface_type = stInternal;
}