Little clean-up of ConstVectorOfPtrsAdaptor to be more vector like.

This commit is contained in:
Vojtech Bubnik 2022-10-19 12:32:54 +02:00
parent 71660a281b
commit 24f671e924
2 changed files with 1 additions and 2 deletions

View File

@ -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

View File

@ -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<const T*> vector() const { return std::vector<const T*>(this->begin(), this->end()); }
protected:
ConstVectorOfPtrsAdaptor(const std::vector<T*> *data) : m_data(data) {}
private: