From 3e82897353e576dc6e3fbf55371fda5a0c3415df Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 12 Jun 2014 14:06:28 +0200 Subject: improve the inlinesimplememberfunctions clang plugin Change-Id: I6d5a952901648e01904ef5c37f953c517304d31e --- desktop/source/app/cmdlineargs.cxx | 32 ------------------------------ desktop/source/app/cmdlineargs.hxx | 16 +++++++-------- desktop/source/deployment/dp_persmap.cxx | 6 ------ desktop/source/deployment/inc/dp_persmap.h | 2 +- 4 files changed, 9 insertions(+), 47 deletions(-) (limited to 'desktop') diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index 35e93e66eade..5f98e07a7625 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -634,10 +634,6 @@ void CommandLineArgs::InitParamValues() -OUString CommandLineArgs::GetUnknown() const -{ - return m_unknown; -} bool CommandLineArgs::HasModuleParam() const { @@ -646,15 +642,7 @@ bool CommandLineArgs::HasModuleParam() const } -std::vector< OUString > const & CommandLineArgs::GetAccept() const -{ - return m_accept; -} -std::vector< OUString > const & CommandLineArgs::GetUnaccept() const -{ - return m_unaccept; -} std::vector< OUString > CommandLineArgs::GetOpenList() const { @@ -691,30 +679,14 @@ std::vector< OUString > CommandLineArgs::GetPrintToList() const return translateExternalUris(m_printtolist); } -OUString CommandLineArgs::GetPrinterName() const -{ - return m_printername; -} -OUString CommandLineArgs::GetLanguage() const -{ - return m_language; -} -std::vector< OUString > const & CommandLineArgs::GetInFilter() const -{ - return m_infilter; -} std::vector< OUString > CommandLineArgs::GetConversionList() const { return translateExternalUris(m_conversionlist); } -OUString CommandLineArgs::GetConversionParams() const -{ - return m_conversionparams; -} OUString CommandLineArgs::GetConversionOut() const { return translateExternalUris(m_conversionout); @@ -722,10 +694,6 @@ OUString CommandLineArgs::GetConversionOut() const -OUString CommandLineArgs::GetPidfileName() const -{ - return m_pidfile; -} } // namespace desktop diff --git a/desktop/source/app/cmdlineargs.hxx b/desktop/source/app/cmdlineargs.hxx index faa76f892a7b..609befbb979b 100644 --- a/desktop/source/app/cmdlineargs.hxx +++ b/desktop/source/app/cmdlineargs.hxx @@ -86,12 +86,12 @@ class CommandLineArgs: private boost::noncopyable bool HasModuleParam() const; bool WantsToLoadDocument() const { return m_bDocumentArgs;} - OUString GetUnknown() const; + OUString GetUnknown() const { return m_unknown;} // Access to string parameters bool HasSplashPipe() const { return m_splashpipe;} - std::vector< OUString > const & GetAccept() const; - std::vector< OUString > const & GetUnaccept() const; + std::vector< OUString > const & GetAccept() const { return m_accept;} + std::vector< OUString > const & GetUnaccept() const { return m_unaccept;} std::vector< OUString > GetOpenList() const; std::vector< OUString > GetViewList() const; std::vector< OUString > GetStartList() const; @@ -99,13 +99,13 @@ class CommandLineArgs: private boost::noncopyable std::vector< OUString > GetForceNewList() const; std::vector< OUString > GetPrintList() const; std::vector< OUString > GetPrintToList() const; - OUString GetPrinterName() const; - OUString GetLanguage() const; - std::vector< OUString > const & GetInFilter() const; + OUString GetPrinterName() const { return m_printername;} + OUString GetLanguage() const { return m_language;} + std::vector< OUString > const & GetInFilter() const { return m_infilter;} std::vector< OUString > GetConversionList() const; - OUString GetConversionParams() const; + OUString GetConversionParams() const { return m_conversionparams;} OUString GetConversionOut() const; - OUString GetPidfileName() const; + OUString GetPidfileName() const { return m_pidfile;} // Special analyzed states (does not match directly to a command line parameter!) bool IsEmpty() const { return m_bEmpty;} diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx index d9b7b6405f3b..eb47be61d22b 100644 --- a/desktop/source/deployment/dp_persmap.cxx +++ b/desktop/source/deployment/dp_persmap.cxx @@ -316,12 +316,6 @@ bool PersistentMap::erase( OString const & key, bool flush_immediately ) return true; } -t_string2string_map PersistentMap::getEntries() const -{ - // TODO: return by const reference instead? - return m_entries; -} - #ifndef DISABLE_BDB2PMAP bool PersistentMap::importFromBDB() { diff --git a/desktop/source/deployment/inc/dp_persmap.h b/desktop/source/deployment/inc/dp_persmap.h index aa978434b168..dcbc4d10c80b 100644 --- a/desktop/source/deployment/inc/dp_persmap.h +++ b/desktop/source/deployment/inc/dp_persmap.h @@ -49,7 +49,7 @@ public: bool has( OString const & key ) const; bool get( OString * value, OString const & key ) const; - t_string2string_map getEntries() const; + const t_string2string_map& getEntries() const { return m_entries; } void put( OString const & key, OString const & value ); bool erase( OString const & key, bool flush_immediately = true ); -- cgit