summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-08-18 12:27:49 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-08-18 14:24:11 +0100
commit4630157e29f565c110f4fa11223a2d2358508c26 (patch)
treef27b9b6e953ec3ae433172229a596ab0bdc9d934 /sc
parent8a6eb111609fbb1e0270ef5ba475b027635c9749 (diff)
cppcheck: passedByValue
Change-Id: I3ffcfe1294a1cbb06aadd3a1a79e9259876e38cc
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx14
-rw-r--r--sc/source/core/opencl/opbase.cxx4
-rw-r--r--sc/source/core/opencl/opbase.hxx4
3 files changed, 11 insertions, 11 deletions
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 859d9e32b80f..d0c1f3c8bb51 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -250,7 +250,7 @@ class ConstStringArgument : public DynamicKernelArgument
{
public:
ConstStringArgument( const ScCalcConfig& config, const std::string& s,
- FormulaTreeNodeRef ft ) :
+ const FormulaTreeNodeRef& ft ) :
DynamicKernelArgument(config, s, ft) { }
/// Generate declaration
virtual void GenDecl( std::stringstream& ss ) const override
@@ -307,7 +307,7 @@ class DynamicKernelConstantArgument : public DynamicKernelArgument
{
public:
DynamicKernelConstantArgument( const ScCalcConfig& config, const std::string& s,
- FormulaTreeNodeRef ft ) :
+ const FormulaTreeNodeRef& ft ) :
DynamicKernelArgument(config, s, ft) { }
/// Generate declaration
virtual void GenDecl( std::stringstream& ss ) const override
@@ -356,7 +356,7 @@ class DynamicKernelPiArgument : public DynamicKernelArgument
{
public:
DynamicKernelPiArgument( const ScCalcConfig& config, const std::string& s,
- FormulaTreeNodeRef ft ) :
+ const FormulaTreeNodeRef& ft ) :
DynamicKernelArgument(config, s, ft) { }
/// Generate declaration
virtual void GenDecl( std::stringstream& ss ) const override
@@ -396,7 +396,7 @@ class DynamicKernelRandomArgument : public DynamicKernelArgument
{
public:
DynamicKernelRandomArgument( const ScCalcConfig& config, const std::string& s,
- FormulaTreeNodeRef ft ) :
+ const FormulaTreeNodeRef& ft ) :
DynamicKernelArgument(config, s, ft) { }
/// Generate declaration
virtual void GenDecl( std::stringstream& ss ) const override
@@ -762,7 +762,7 @@ class DynamicKernelStringArgument : public VectorRef
{
public:
DynamicKernelStringArgument( const ScCalcConfig& config, const std::string& s,
- FormulaTreeNodeRef ft, int index = 0 ) :
+ const FormulaTreeNodeRef& ft, int index = 0 ) :
VectorRef(config, s, ft, index) { }
virtual void GenSlidingWindowFunction( std::stringstream& ) override { }
@@ -872,7 +872,7 @@ class DynamicKernelMixedArgument : public VectorRef
{
public:
DynamicKernelMixedArgument( const ScCalcConfig& config, const std::string& s,
- FormulaTreeNodeRef ft ) :
+ const FormulaTreeNodeRef& ft ) :
VectorRef(config, s, ft), mStringArgument(config, s + "s", ft) { }
virtual void GenSlidingWindowDecl( std::stringstream& ss ) const override
{
@@ -1132,7 +1132,7 @@ class DynamicKernelMixedSlidingArgument : public VectorRef
{
public:
DynamicKernelMixedSlidingArgument( const ScCalcConfig& config, const std::string& s,
- FormulaTreeNodeRef ft, std::shared_ptr<SlidingFunctionBase>& CodeGen,
+ const FormulaTreeNodeRef& ft, std::shared_ptr<SlidingFunctionBase>& CodeGen,
int index = 0 ) :
VectorRef(config, s, ft),
mDoubleArgument(mCalcConfig, s, ft, CodeGen, index),
diff --git a/sc/source/core/opencl/opbase.cxx b/sc/source/core/opencl/opbase.cxx
index 914da5189757..0c4c4d2f563b 100644
--- a/sc/source/core/opencl/opbase.cxx
+++ b/sc/source/core/opencl/opbase.cxx
@@ -33,7 +33,7 @@ Unhandled::Unhandled( const std::string& fn, int ln ) :
mFile(fn), mLineNumber(ln) {}
DynamicKernelArgument::DynamicKernelArgument( const ScCalcConfig& config, const std::string& s,
- FormulaTreeNodeRef ft ) :
+ const FormulaTreeNodeRef& ft ) :
mCalcConfig(config), mSymName(s), mFormulaTree(ft) { }
std::string DynamicKernelArgument::GenDoubleSlidingWindowDeclRef( bool ) const
@@ -92,7 +92,7 @@ bool DynamicKernelArgument::NeedParallelReduction() const
return false;
}
-VectorRef::VectorRef( const ScCalcConfig& config, const std::string& s, FormulaTreeNodeRef ft, int idx ) :
+VectorRef::VectorRef( const ScCalcConfig& config, const std::string& s, const FormulaTreeNodeRef& ft, int idx ) :
DynamicKernelArgument(config, s, ft), mpClmem(nullptr), mnIndex(idx)
{
if (mnIndex)
diff --git a/sc/source/core/opencl/opbase.hxx b/sc/source/core/opencl/opbase.hxx
index 2984f1cf2785..e99ecc5319ce 100644
--- a/sc/source/core/opencl/opbase.hxx
+++ b/sc/source/core/opencl/opbase.hxx
@@ -89,7 +89,7 @@ public:
/// delete copy-assignment operator
const DynamicKernelArgument& operator=( const DynamicKernelArgument& ) = delete;
- DynamicKernelArgument( const ScCalcConfig& config, const std::string& s, FormulaTreeNodeRef ft );
+ DynamicKernelArgument( const ScCalcConfig& config, const std::string& s, const FormulaTreeNodeRef& ft );
virtual ~DynamicKernelArgument() {}
/// Generate declaration
@@ -143,7 +143,7 @@ typedef std::shared_ptr<DynamicKernelArgument> DynamicKernelArgumentRef;
class VectorRef : public DynamicKernelArgument
{
public:
- VectorRef( const ScCalcConfig& config, const std::string& s, FormulaTreeNodeRef ft, int index = 0 );
+ VectorRef( const ScCalcConfig& config, const std::string& s, const FormulaTreeNodeRef& ft, int index = 0 );
virtual ~VectorRef();
/// Generate declaration