summaryrefslogtreecommitdiff
path: root/sc/source/core
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-09-06 08:50:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-09-06 09:54:25 +0200
commit24eae7bd702f3f6dd790be7ac38ac16e9fe6a375 (patch)
tree56398264184709e84517c2e843aa3a0894cc1c51 /sc/source/core
parentfad919eb0d30b2303193e1c00ba765514957652c (diff)
clang-tidy performance-unnecessary-value-param
Change-Id: I69247498e13331f6ef84afeb242479f8fb1178a8 Reviewed-on: https://gerrit.libreoffice.org/60068 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core')
-rw-r--r--sc/source/core/data/colorscale.cxx2
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx30
-rw-r--r--sc/source/core/tool/token.cxx6
3 files changed, 22 insertions, 16 deletions
diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx
index 3617dcf7401f..46dea0e3f124 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -346,7 +346,7 @@ void ScColorScaleEntry::setListener()
}
}
-void ScColorScaleEntry::SetRepaintCallback(std::function<void()> func)
+void ScColorScaleEntry::SetRepaintCallback(const std::function<void()>& func)
{
mpListener->setCallback(func);
}
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 5bf0269f3978..6a365098a5a5 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -950,10 +950,11 @@ template<class Base>
class DynamicKernelSlidingArgument : public Base
{
public:
- DynamicKernelSlidingArgument( const ScCalcConfig& config, const std::string& s,
- FormulaTreeNodeRef ft, std::shared_ptr<SlidingFunctionBase>& CodeGen,
- int index ) :
- Base(config, s, ft, index), mpCodeGen(CodeGen)
+ DynamicKernelSlidingArgument(const ScCalcConfig& config, const std::string& s,
+ const FormulaTreeNodeRef& ft,
+ std::shared_ptr<SlidingFunctionBase>& CodeGen, int index)
+ : Base(config, s, ft, index)
+ , mpCodeGen(CodeGen)
{
FormulaToken* t = ft->GetFormulaToken();
if (t->GetType() != formula::svDoubleVectorRef)
@@ -1175,8 +1176,9 @@ public:
typedef std::map<const formula::FormulaToken*, DynamicKernelArgumentRef> ArgumentMap;
// This avoids instability caused by using pointer as the key type
SymbolTable() : mCurId(0) { }
- template<class T>
- const DynamicKernelArgument* DeclRefArg( const ScCalcConfig& config, FormulaTreeNodeRef, SlidingFunctionBase* pCodeGen, int nResultSize );
+ template <class T>
+ const DynamicKernelArgument* DeclRefArg(const ScCalcConfig& config, const FormulaTreeNodeRef&,
+ SlidingFunctionBase* pCodeGen, int nResultSize);
/// Used to generate sliding window helpers
void DumpSlidingWindowFunctions( std::stringstream& ss )
{
@@ -1211,10 +1213,11 @@ template<class Base>
class ParallelReductionVectorRef : public Base
{
public:
- ParallelReductionVectorRef( const ScCalcConfig& config, const std::string& s,
- FormulaTreeNodeRef ft, std::shared_ptr<SlidingFunctionBase>& CodeGen,
- int index ) :
- Base(config, s, ft, index), mpCodeGen(CodeGen)
+ ParallelReductionVectorRef(const ScCalcConfig& config, const std::string& s,
+ const FormulaTreeNodeRef& ft,
+ std::shared_ptr<SlidingFunctionBase>& CodeGen, int index)
+ : Base(config, s, ft, index)
+ , mpCodeGen(CodeGen)
{
FormulaToken* t = ft->GetFormulaToken();
if (t->GetType() != formula::svDoubleVectorRef)
@@ -3544,9 +3547,10 @@ void DynamicKernel::Launch( size_t nr )
// Symbol lookup. If there is no such symbol created, allocate one
// kernel with argument with unique name and return so.
// The template argument T must be a subclass of DynamicKernelArgument
-template<typename T>
-const DynamicKernelArgument* SymbolTable::DeclRefArg( const ScCalcConfig& config,
- FormulaTreeNodeRef t, SlidingFunctionBase* pCodeGen, int nResultSize )
+template <typename T>
+const DynamicKernelArgument* SymbolTable::DeclRefArg(const ScCalcConfig& config,
+ const FormulaTreeNodeRef& t,
+ SlidingFunctionBase* pCodeGen, int nResultSize)
{
FormulaToken* ref = t->GetFormulaToken();
ArgumentMap::iterator it = mSymbols.find(ref);
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 51a63f548afe..89bc5fdf3dcc 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -60,6 +60,7 @@ using ::std::vector;
#include <com/sun/star/sheet/FormulaToken.hpp>
#include <com/sun/star/sheet/ReferenceFlags.hpp>
#include <com/sun/star/sheet/NameToken.hpp>
+#include <utility>
using namespace formula;
using namespace com::sun::star;
@@ -939,8 +940,9 @@ bool ScTableRefToken::operator==( const FormulaToken& r ) const
return true;
}
-ScJumpMatrixToken::ScJumpMatrixToken( std::shared_ptr<ScJumpMatrix> p )
- : FormulaToken( formula::svJumpMatrix ), mpJumpMatrix( p )
+ScJumpMatrixToken::ScJumpMatrixToken(std::shared_ptr<ScJumpMatrix> p)
+ : FormulaToken(formula::svJumpMatrix)
+ , mpJumpMatrix(std::move(p))
{}
ScJumpMatrixToken::ScJumpMatrixToken( const ScJumpMatrixToken & ) = default;