From 24f671e924cbf673762e0c7e302c28f81d124edf Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Wed, 19 Oct 2022 12:32:54 +0200 Subject: [PATCH] Little clean-up of ConstVectorOfPtrsAdaptor to be more vector like. --- src/libslic3r/GCode/ToolOrdering.cpp | 2 +- src/libslic3r/Print.hpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libslic3r/GCode/ToolOrdering.cpp b/src/libslic3r/GCode/ToolOrdering.cpp index 870096bb9..c5554c2fa 100644 --- a/src/libslic3r/GCode/ToolOrdering.cpp +++ b/src/libslic3r/GCode/ToolOrdering.cpp @@ -658,7 +658,7 @@ float WipingExtrusions::mark_wiping_extrusions(const Print& print, unsigned int return std::max(0.f, volume_to_wipe); // Soluble filament cannot be wiped in a random infill, neither the filament after it // we will sort objects so that dedicated for wiping are at the beginning: - ConstPrintObjectPtrs object_list = print.objects().vector(); + ConstPrintObjectPtrs object_list(print.objects().begin(), print.objects().end()); std::sort(object_list.begin(), object_list.end(), [](const PrintObject* a, const PrintObject* b) { return a->config().wipe_into_objects; }); // We will now iterate through diff --git a/src/libslic3r/Print.hpp b/src/libslic3r/Print.hpp index c2777083d..967c9e707 100644 --- a/src/libslic3r/Print.hpp +++ b/src/libslic3r/Print.hpp @@ -129,7 +129,6 @@ public: bool empty() const { return m_data->empty(); } const T* operator[](size_t i) const { return (*m_data)[i]; } const T* at(size_t i) const { return m_data->at(i); } - std::vector vector() const { return std::vector(this->begin(), this->end()); } protected: ConstVectorOfPtrsAdaptor(const std::vector *data) : m_data(data) {} private: