From 966d9757de471f2a5ea1ffa87cef019dcf1e0cb3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 21 Jun 2022 09:05:15 +0200 Subject: clang-tidy modernize-pass-by-value in helpcompiler Change-Id: Ia074fb5be66486e56af2540a978e72c954485e42 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136205 Tested-by: Jenkins Reviewed-by: Noel Grandin --- helpcompiler/inc/HelpCompiler.hxx | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'helpcompiler/inc') diff --git a/helpcompiler/inc/HelpCompiler.hxx b/helpcompiler/inc/HelpCompiler.hxx index 541f4bc078e5..c66e705ae222 100644 --- a/helpcompiler/inc/HelpCompiler.hxx +++ b/helpcompiler/inc/HelpCompiler.hxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -162,15 +163,15 @@ struct HelpProcessingException std::string m_aXMLParsingFile; int m_nXMLParsingLine; - HelpProcessingException( HelpProcessingErrorClass eErrorClass, const std::string& aErrorMsg ) + HelpProcessingException( HelpProcessingErrorClass eErrorClass, std::string aErrorMsg ) : m_eErrorClass( eErrorClass ) - , m_aErrorMsg( aErrorMsg ) + , m_aErrorMsg(std::move( aErrorMsg )) , m_nXMLParsingLine( 0 ) {} - HelpProcessingException( const std::string& aErrorMsg, const std::string& aXMLParsingFile, int nXMLParsingLine ) + HelpProcessingException( std::string aErrorMsg, std::string aXMLParsingFile, int nXMLParsingLine ) : m_eErrorClass( HelpProcessingErrorClass::XmlParsing ) - , m_aErrorMsg( aErrorMsg ) - , m_aXMLParsingFile( aXMLParsingFile ) + , m_aErrorMsg(std::move( aErrorMsg )) + , m_aXMLParsingFile(std::move( aXMLParsingFile )) , m_nXMLParsingLine( nXMLParsingLine ) {} }; @@ -179,13 +180,13 @@ class HelpCompiler { public: HelpCompiler(StreamTable &streamTable, - const fs::path &in_inputFile, - const fs::path &in_src, - const fs::path &in_zipdir, - const fs::path &in_resCompactStylesheet, - const fs::path &in_resEmbStylesheet, - const std::string &in_module, - const std::string &in_lang, + fs::path in_inputFile, + fs::path in_src, + fs::path in_zipdir, + fs::path in_resCompactStylesheet, + fs::path in_resEmbStylesheet, + std::string in_module, + std::string in_lang, bool in_bExtensionMode); /// @throws HelpProcessingException /// @throws BasicCodeTagger::TaggerException -- cgit v1.2.3