diff --git a/eeschema/dialogs/dialog_lib_new_component.h b/eeschema/dialogs/dialog_lib_new_component.h index 67ab3296bb..b8b9619fdf 100644 --- a/eeschema/dialogs/dialog_lib_new_component.h +++ b/eeschema/dialogs/dialog_lib_new_component.h @@ -1,8 +1,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2009 Wayne Stambaugh - * Copyright (C) 2014 KiCad Developers, see CHANGELOG.TXT for contributors. + * Copyright (C) 2009-2105 Wayne Stambaugh + * Copyright (C) 2015 KiCad Developers, see CHANGELOG.TXT for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -40,7 +40,7 @@ public: DIALOG_LIB_NEW_COMPONENT( wxWindow* parent ); void SetName( const wxString& name ) { m_textName->SetValue( name ); } - wxString GetName( void ) { return m_textName->GetValue(); } + wxString GetName( void ) const { return m_textName->GetValue(); } void SetReference( const wxString& reference ) { diff --git a/include/base_struct.h b/include/base_struct.h index 360e4ff6b1..c88e481c3c 100644 --- a/include/base_struct.h +++ b/include/base_struct.h @@ -1,10 +1,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 2008-2013 SoftPLC Corporation, Dick Hollenbeck - * Copyright (C) 2008-2013 Wayne Stambaugh - * Copyright (C) 2004-2013 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2013-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 2008-2015 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2008-2015 Wayne Stambaugh + * Copyright (C) 2004-2015 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -426,17 +426,7 @@ public: } /** - * Function Matches - * compares \a aText against search criteria in \a aSearchData. * Helper function used in search and replace dialog - * - * @param aText A reference to a wxString object containing the string to test. - * @param aSearchData The criteria to search against. - * @return True if \a aText matches the search criteria in \a aSearchData. - */ - bool Matches( const wxString& aText, wxFindReplaceData& aSearchData ); - - /** * Function Replace * performs a text replace on \a aText using the find and replace criteria in * \a aSearchData on items that support text find and replace. @@ -534,6 +524,18 @@ public: static std::ostream& NestedSpace( int nestLevel, std::ostream& os ); #endif + +protected: + /** + * Function Matches + * compares \a aText against search criteria in \a aSearchData. + * This is a helper function for simplify derived class logic. + * + * @param aText A reference to a wxString object containing the string to test. + * @param aSearchData The criteria to search against. + * @return True if \a aText matches the search criteria in \a aSearchData. + */ + bool Matches( const wxString& aText, wxFindReplaceData& aSearchData ); };