Use wxVector::shrink_to_fit() directly

Don't use deprecated wxShrinkToFit() as now wxVector always has this
member function because it is available even in STL build when using
C++11.
This commit is contained in:
Vadim Zeitlin
2022-10-11 00:02:29 +02:00
parent dd404fdd77
commit b83178086d
2 changed files with 2 additions and 6 deletions
+1 -5
View File
@@ -108,11 +108,7 @@ public:
void Empty() { this->clear(); }
void Clear() { this->clear(); }
void Alloc(size_t uiSize) { this->reserve(uiSize); }
void Shrink()
{
wxShrinkToFit(*this);
}
void Shrink() { this->shrink_to_fit(); }
size_t GetCount() const { return this->size(); }
void SetCount(size_t n, T v = T()) { this->resize(n, v); }
+1 -1
View File
@@ -1728,7 +1728,7 @@ wxListLineData *wxListMainWindow::GetDummyLine() const
// don't waste extra memory -- there never going to be anything
// else/more in this array
wxShrinkToFit(self->m_lines);
self->m_lines.shrink_to_fit();
}
return m_lines[0];