Little clean-up of ConstVectorOfPtrsAdaptor to be more vector like.
This commit is contained in:
parent
71660a281b
commit
24f671e924
2 changed files with 1 additions and 2 deletions
|
@ -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
|
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:
|
// 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; });
|
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
|
// We will now iterate through
|
||||||
|
|
|
@ -129,7 +129,6 @@ public:
|
||||||
bool empty() const { return m_data->empty(); }
|
bool empty() const { return m_data->empty(); }
|
||||||
const T* operator[](size_t i) const { return (*m_data)[i]; }
|
const T* operator[](size_t i) const { return (*m_data)[i]; }
|
||||||
const T* at(size_t i) const { return m_data->at(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:
|
protected:
|
||||||
ConstVectorOfPtrsAdaptor(const std::vector<T*> *data) : m_data(data) {}
|
ConstVectorOfPtrsAdaptor(const std::vector<T*> *data) : m_data(data) {}
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in a new issue