Define wxShrinkToFit() helper for wxVector<>

Unlike member shrink_to_fit(), this function is always defined, even
when wxVector is pre-C++11 std::vector<>.
This commit is contained in:
Vadim Zeitlin
2018-09-17 23:19:23 +02:00
parent 0fd8ec0fa2
commit 26b4701ebd
2 changed files with 14 additions and 6 deletions

View File

@@ -111,12 +111,7 @@ public:
void Shrink()
{
#if !wxUSE_STD_CONTAINERS || __cplusplus >= 201103L || wxCHECK_VISUALC_VERSION(10)
this->shrink_to_fit();
#else
base_vec tmp(*this);
this->swap(tmp);
#endif
wxShrinkToFit(*this);
}
size_t GetCount() const { return this->size(); }