From ea965327ebcf11e8c507f62e75a18742b3db2869 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 22 Aug 2019 00:01:36 +0200 Subject: [PATCH] Add wxString::shrink_to_fit() as synonym for Shrink() Provide C++11 std::string-compatible method name too. --- include/wx/string.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/wx/string.h b/include/wx/string.h index 6aa8d4d323..a5a3b3108a 100644 --- a/include/wx/string.h +++ b/include/wx/string.h @@ -1350,6 +1350,8 @@ public: size_type capacity() const { return m_impl.capacity(); } void reserve(size_t sz) { m_impl.reserve(sz); } + void shrink_to_fit() { Shrink(); } + void resize(size_t nSize, wxUniChar ch = wxT('\0')) { const size_t len = length();