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 <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
79a279eee1
commit
966d9757de
4 changed files with 27 additions and 24 deletions
|
@ -26,6 +26,7 @@
|
|||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <libxml/parser.h>
|
||||
|
@ -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
|
||||
|
|
|
@ -29,14 +29,15 @@
|
|||
#include <libxslt/transform.h>
|
||||
#include <rtl/character.hxx>
|
||||
#include <sal/log.hxx>
|
||||
#include <utility>
|
||||
|
||||
HelpCompiler::HelpCompiler(StreamTable &in_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,
|
||||
HelpCompiler::HelpCompiler(StreamTable &in_streamTable, 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)
|
||||
: streamTable(in_streamTable), inputFile(in_inputFile),
|
||||
src(in_src), zipdir(in_zipdir), module(in_module), lang(in_lang), resCompactStylesheet(in_resCompactStylesheet),
|
||||
resEmbStylesheet(in_resEmbStylesheet), bExtensionMode( in_bExtensionMode )
|
||||
: streamTable(in_streamTable), inputFile(std::move(in_inputFile)),
|
||||
src(std::move(in_src)), zipdir(std::move(in_zipdir)), module(std::move(in_module)), lang(std::move(in_lang)), resCompactStylesheet(std::move(in_resCompactStylesheet)),
|
||||
resEmbStylesheet(std::move(in_resEmbStylesheet)), bExtensionMode( in_bExtensionMode )
|
||||
{
|
||||
xmlKeepBlanksDefaultValue = 0;
|
||||
char* os = getenv("OS");
|
||||
|
@ -239,9 +240,9 @@ public:
|
|||
private:
|
||||
std::vector<std::string> extendedHelpText;
|
||||
public:
|
||||
myparser(const std::string &indocumentId, const std::string &infileName,
|
||||
const std::string &intitle) : documentId(indocumentId), fileName(infileName),
|
||||
title(intitle)
|
||||
myparser(std::string indocumentId, std::string infileName,
|
||||
std::string intitle) : documentId(std::move(indocumentId)), fileName(std::move(infileName)),
|
||||
title(std::move(intitle))
|
||||
{
|
||||
hidlist.reset(new std::vector<std::string>);
|
||||
keywords.reset(new Hashtable);
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include <osl/thread.h>
|
||||
#include <o3tl/string_view.hxx>
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
||||
#include "LuceneHelper.hxx"
|
||||
#include <CLucene.h>
|
||||
|
@ -29,9 +30,9 @@
|
|||
|
||||
using namespace lucene::document;
|
||||
|
||||
HelpIndexer::HelpIndexer(OUString const &lang, OUString const &module,
|
||||
HelpIndexer::HelpIndexer(OUString lang, OUString module,
|
||||
std::u16string_view srcDir, std::u16string_view outDir)
|
||||
: d_lang(lang), d_module(module)
|
||||
: d_lang(std::move(lang)), d_module(std::move(module))
|
||||
{
|
||||
d_indexDir = outDir + OUStringChar('/') + module + ".idxl";
|
||||
d_captionDir = OUString::Concat(srcDir) + "/caption";
|
||||
|
|
|
@ -48,7 +48,7 @@ class L10N_DLLPUBLIC HelpIndexer {
|
|||
* @param srcDir The help directory to index
|
||||
* @param outDir The directory to write the "module".idxl directory to
|
||||
*/
|
||||
HelpIndexer(OUString const &lang, OUString const &module,
|
||||
HelpIndexer(OUString lang, OUString module,
|
||||
std::u16string_view srcDir, std::u16string_view outDir);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue