From 2f74c9c6b5f3bb21539797e4338eeaecbd0cdfdc Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 15 Mar 2008 03:05:28 +0000 Subject: [PATCH] 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 --- include/wx/textentry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.50.0