lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] trivial patch: don't use deprecated GetPrintableName()


From: Vadim Zeitlin
Subject: [lmi] trivial patch: don't use deprecated GetPrintableName()
Date: Sat, 10 May 2008 17:37:55 +0200

 Hello,

 Here is a really trivial patch which avoids a warning about using a
deprecated function:

--- upstream/view_ex.cpp        2008-04-09 22:00:11.000000000 +0200
+++ modified/view_ex.cpp        2008-05-10 17:36:14.000000000 +0200
@@ -179,8 +179,6 @@
 std::string ViewEx::base_filename() const
 {
-    wxString z;
-    GetDocument()->GetPrintableName(z);
-    std::string t(z);
-    if(0 == t.size())
+    std::string t(GetDocument()->GetUserReadableName());
+    if(t.empty())
         {
         t = "Anonymous";

wxDocument::GetUserReadableName() exists since wx 2.8.5 so there should be
no problems with using it with the version of wx currently required by LMI.

 As you can see I also replaced comparison of string size with 0 with a
direct test of whether it's empty as this is more readable IMO but the
important part is the change of GetPrintableName() to GetUserReadableName().

 Thanks,
VZ





reply via email to

[Prev in Thread] Current Thread [Next in Thread]