From bbdaa44acb4d5147a957988e76debd8c4f13d86b Mon Sep 17 00:00:00 2001 From: bubnikv Date: Thu, 5 Jan 2017 09:11:36 +0100 Subject: [PATCH] Const version of a PrintObject::get_region(). Made get_region() inline. --- xs/src/libslic3r/Print.cpp | 6 ------ xs/src/libslic3r/Print.hpp | 3 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 3583c627b..e04d4ac79 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -133,12 +133,6 @@ Print::clear_regions() this->delete_region(i); } -PrintRegion* -Print::get_region(size_t idx) -{ - return regions.at(idx); -} - PrintRegion* Print::add_region() { diff --git a/xs/src/libslic3r/Print.hpp b/xs/src/libslic3r/Print.hpp index e8b0e0a03..a0392290d 100644 --- a/xs/src/libslic3r/Print.hpp +++ b/xs/src/libslic3r/Print.hpp @@ -206,7 +206,8 @@ class Print bool reload_model_instances(); // methods for handling regions - PrintRegion* get_region(size_t idx); + PrintRegion* get_region(size_t idx) { return regions.at(idx); } + const PrintRegion* get_region(size_t idx) const { return regions.at(idx); } PrintRegion* add_region(); // methods for handling state