From: Vadim Zeitlin Date: Sat, 15 Mar 2008 03:05:28 +0000 (+0000) Subject: use less expensive GetLastPosition() instead of GetValue() to implement IsEmpty() X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2f74c9c6b5f3bb21539797e4338eeaecbd0cdfdc?ds=sidebyside use less expensive GetLastPosition() instead of GetValue() to implement IsEmpty() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/textentry.h b/include/wx/textentry.h index 3d4863d881..93ae8fbf37 100644 --- a/include/wx/textentry.h +++ b/include/wx/textentry.h @@ -45,7 +45,7 @@ public: virtual wxString GetValue() const = 0; virtual wxString GetRange(long from, long to) const; - bool IsEmpty() const { return GetValue().empty(); } + bool IsEmpty() const { return GetLastPosition() > 0; } // editing operations