From c78c23c73da02a7f84a3adc8e707d4a2bc080619 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Wed, 25 Jul 2018 23:38:46 -0500 Subject: [PATCH] Don't need the const_cast. --- xs/src/libslic3r/PrintGCode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xs/src/libslic3r/PrintGCode.cpp b/xs/src/libslic3r/PrintGCode.cpp index a5efe937b..8932ae859 100644 --- a/xs/src/libslic3r/PrintGCode.cpp +++ b/xs/src/libslic3r/PrintGCode.cpp @@ -514,9 +514,9 @@ PrintGCode::process_layer(size_t idx, const Layer* layer, const Points& copies) const auto n_slices {layer->slices.size()}; for (auto region_id = 0U; region_id < print.regions.size(); ++region_id) { - LayerRegion* layerm; + const LayerRegion* layerm; try { - layerm = const_cast(layer->get_region(region_id)); + layerm = layer->get_region(region_id); // we promise to be good and not give this to anyone who will modify it } catch (std::out_of_range &e) { continue; // if no regions, bail; }