From d4460435d9e50af124a65b93fd06138ca7bed553 Mon Sep 17 00:00:00 2001 From: Marek Temnyak Date: Thu, 14 Apr 2016 15:57:37 +0200 Subject: [PATCH] Make source string const in wxPropertyGrid escape sequence methods Source string is not changed in {Expand,Create}EscapeSequences() methods, so make it const. Closes https://github.com/wxWidgets/wxWidgets/pull/271 --- include/wx/propgrid/propgrid.h | 4 ++-- src/propgrid/propgrid.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index d40f249aae..b01d995dc7 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -1553,12 +1553,12 @@ public: // Converts escape sequences in src_str to newlines, // tabs, etc. and copies result to dst_str. static wxString& ExpandEscapeSequences( wxString& dst_str, - wxString& src_str ); + const wxString& src_str ); // Converts newlines, tabs, etc. in src_str to escape // sequences, and copies result to dst_str. static wxString& CreateEscapeSequences( wxString& dst_str, - wxString& src_str ); + const wxString& src_str ); // Checks system screen design used for laying out various dialogs. static bool IsSmallScreen(); diff --git a/src/propgrid/propgrid.cpp b/src/propgrid/propgrid.cpp index 345300e09d..240a7f1be2 100644 --- a/src/propgrid/propgrid.cpp +++ b/src/propgrid/propgrid.cpp @@ -1733,7 +1733,7 @@ wxPoint wxPropertyGrid::GetGoodEditorDialogPosition( wxPGProperty* p, // ----------------------------------------------------------------------- -wxString& wxPropertyGrid::ExpandEscapeSequences( wxString& dst_str, wxString& src_str ) +wxString& wxPropertyGrid::ExpandEscapeSequences( wxString& dst_str, const wxString& src_str ) { dst_str.clear(); @@ -1791,7 +1791,7 @@ wxString& wxPropertyGrid::ExpandEscapeSequences( wxString& dst_str, wxString& sr // ----------------------------------------------------------------------- -wxString& wxPropertyGrid::CreateEscapeSequences( wxString& dst_str, wxString& src_str ) +wxString& wxPropertyGrid::CreateEscapeSequences( wxString& dst_str, const wxString& src_str ) { dst_str.clear();