From b0bf18bdc35fb3e4150795799d75afed8f2aba1c Mon Sep 17 00:00:00 2001 From: Roland Schulz Date: Mon, 25 Jun 2018 22:58:20 -0700 Subject: [PATCH] clang-tidy: misc-string-compare+perf-value-param misc-suspicious-string-compare performance-unnecessary-value-param Change-Id: Ia9b038206e21ca324cd314385c9a6ca4509473d3 --- src/gromacs/CMakeLists.txt | 2 -- src/gromacs/analysisdata/abstractdata.cpp | 7 ++++--- src/gromacs/analysisdata/datamodulemanager.cpp | 5 +++-- src/gromacs/analysisdata/modules/displacement.cpp | 4 ++-- src/gromacs/analysisdata/modules/displacement.h | 4 ++-- src/gromacs/commandline/cmdlineinit.cpp | 5 +++-- src/gromacs/commandline/cmdlineoptionsmodule.cpp | 9 +++++---- src/gromacs/fileio/groio.cpp | 2 +- src/gromacs/fileio/tpxio.cpp | 2 +- src/gromacs/fileio/xvgr.cpp | 4 ++-- src/gromacs/gmxana/gmx_awh.cpp | 8 ++++---- src/gromacs/gmxana/gmx_confrms.cpp | 2 +- src/gromacs/gmxana/gmx_make_ndx.cpp | 4 ++-- src/gromacs/gmxana/gmx_wham.cpp | 4 ++-- src/gromacs/gmxpreprocess/gen_vsite.cpp | 18 +++++++++--------- src/gromacs/pulling/pull.cpp | 4 ++-- src/gromacs/trajectoryanalysis/cmdlinerunner.cpp | 6 +++--- src/gromacs/trajectoryanalysis/cmdlinerunner.h | 6 +++--- src/gromacs/utility/keyvaluetreetransform.cpp | 4 ++-- src/gromacs/utility/keyvaluetreetransform.h | 4 ++-- 20 files changed, 53 insertions(+), 51 deletions(-) diff --git a/src/gromacs/CMakeLists.txt b/src/gromacs/CMakeLists.txt index 0a52fe7558..24ba0d1a61 100644 --- a/src/gromacs/CMakeLists.txt +++ b/src/gromacs/CMakeLists.txt @@ -281,8 +281,6 @@ if (GMX_CLANG_TIDY) -clang-analyzer-security.insecureAPI.strcpy,-clang-analyzer-core.NullDereference,\ bugprone-*,misc-*,readability-*,performance-*,mpi-*,\ -misc-misplaced-widening-cast,-readability-named-parameter,\ - -misc-suspicious-string-compare,\ - -performance-unnecessary-value-param,\ -misc-misplaced-const,\ -misc-incorrect-roundings,-misc-macro-parentheses,-readability-function-size,-readability-else-after-return,\ -readability-inconsistent-declaration-parameter-name,-misc-throw-by-value-catch-by-reference,\ diff --git a/src/gromacs/analysisdata/abstractdata.cpp b/src/gromacs/analysisdata/abstractdata.cpp index 9243b84d9d..341a979347 100644 --- a/src/gromacs/analysisdata/abstractdata.cpp +++ b/src/gromacs/analysisdata/abstractdata.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2010,2011,2012,2013,2014,2015, by the GROMACS development team, led by + * Copyright (c) 2010,2011,2012,2013,2014,2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -43,6 +43,7 @@ #include "abstractdata.h" +#include #include #include "gromacs/analysisdata/dataframe.h" @@ -166,7 +167,7 @@ AbstractAnalysisData::requestStorage(int nframes) void AbstractAnalysisData::addModule(AnalysisDataModulePointer module) { - impl_->modules_.addModule(this, module); + impl_->modules_.addModule(this, std::move(module)); } @@ -178,7 +179,7 @@ AbstractAnalysisData::addColumnModule(int col, int span, "Invalid columns specified for a column module"); std::shared_ptr proxy( new AnalysisDataProxy(col, span, this)); - proxy->addModule(module); + proxy->addModule(std::move(module)); addModule(proxy); } diff --git a/src/gromacs/analysisdata/datamodulemanager.cpp b/src/gromacs/analysisdata/datamodulemanager.cpp index 4eb0a4afaf..da23cb32df 100644 --- a/src/gromacs/analysisdata/datamodulemanager.cpp +++ b/src/gromacs/analysisdata/datamodulemanager.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2010,2011,2012,2013,2014,2015,2016, by the GROMACS development team, led by + * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -43,6 +43,7 @@ #include "datamodulemanager.h" +#include #include #include "gromacs/analysisdata/abstractdata.h" @@ -72,7 +73,7 @@ class AnalysisDataModuleManager::Impl { //! Initializes the module information. explicit ModuleInfo(AnalysisDataModulePointer module) - : module(module), bParallel(false) + : module(std::move(module)), bParallel(false) { } diff --git a/src/gromacs/analysisdata/modules/displacement.cpp b/src/gromacs/analysisdata/modules/displacement.cpp index d8db1660c3..ae8a05ed21 100644 --- a/src/gromacs/analysisdata/modules/displacement.cpp +++ b/src/gromacs/analysisdata/modules/displacement.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2010,2011,2012,2013,2014,2016,2017, by the GROMACS development team, led by + * Copyright (c) 2010,2011,2012,2013,2014,2016,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -138,7 +138,7 @@ AnalysisDataDisplacementModule::setMaxTime(real tmax) void AnalysisDataDisplacementModule::setMSDHistogram( - AnalysisDataBinAverageModulePointer histm) + const AnalysisDataBinAverageModulePointer &histm) { GMX_RELEASE_ASSERT(_impl->histm == nullptr, "Can only set MSD histogram once"); _impl->histm = histm.get(); diff --git a/src/gromacs/analysisdata/modules/displacement.h b/src/gromacs/analysisdata/modules/displacement.h index 966be18b44..6ae776ba49 100644 --- a/src/gromacs/analysisdata/modules/displacement.h +++ b/src/gromacs/analysisdata/modules/displacement.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2010,2011,2012,2013,2014,2015, by the GROMACS development team, led by + * Copyright (c) 2010,2011,2012,2013,2014,2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -82,7 +82,7 @@ class AnalysisDataDisplacementModule : public AbstractAnalysisData, * * If this function is not called, no histogram is calculated. */ - void setMSDHistogram(std::shared_ptr histm); + void setMSDHistogram(const std::shared_ptr &histm); virtual int flags() const; diff --git a/src/gromacs/commandline/cmdlineinit.cpp b/src/gromacs/commandline/cmdlineinit.cpp index e59cb86624..0420c4cb47 100644 --- a/src/gromacs/commandline/cmdlineinit.cpp +++ b/src/gromacs/commandline/cmdlineinit.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2013,2014,2015,2017, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -46,6 +46,7 @@ #include #include +#include #include "gromacs/commandline/cmdlinemodulemanager.h" #include "gromacs/commandline/cmdlineoptionsmodule.h" @@ -165,7 +166,7 @@ int runCommandLineModule( std::function()> factory) { return ICommandLineOptionsModule::runAsMain( - argc, argv, name, description, factory); + argc, argv, name, description, std::move(factory)); } } // namespace gmx diff --git a/src/gromacs/commandline/cmdlineoptionsmodule.cpp b/src/gromacs/commandline/cmdlineoptionsmodule.cpp index 107441f3bb..2c1ed44cc6 100644 --- a/src/gromacs/commandline/cmdlineoptionsmodule.cpp +++ b/src/gromacs/commandline/cmdlineoptionsmodule.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2014,2015,2016,2017, by the GROMACS development team, led by + * Copyright (c) 2014,2015,2016,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -44,6 +44,7 @@ #include "cmdlineoptionsmodule.h" #include +#include #include "gromacs/commandline/cmdlinehelpwriter.h" #include "gromacs/commandline/cmdlinemodulemanager.h" @@ -103,7 +104,7 @@ class CommandLineOptionsModule : public ICommandLineModule CommandLineOptionsModule(const char *name, const char *description, FactoryMethod factory) - : name_(name), description_(description), factory_(factory) + : name_(name), description_(description), factory_(std::move(factory)) { } CommandLineOptionsModule(const char *name, const char *description, @@ -216,7 +217,7 @@ int ICommandLineOptionsModule::runAsMain( int argc, char *argv[], const char *name, const char *description, FactoryMethod factory) { - CommandLineOptionsModule module(name, description, factory); + CommandLineOptionsModule module(name, description, std::move(factory)); return CommandLineModuleManager::runAsMainSingleModule(argc, argv, &module); } @@ -226,7 +227,7 @@ void ICommandLineOptionsModule::registerModuleFactory( const char *description, FactoryMethod factory) { CommandLineModulePointer module( - new CommandLineOptionsModule(name, description, factory)); + new CommandLineOptionsModule(name, description, std::move(factory))); manager->addModule(std::move(module)); } diff --git a/src/gromacs/fileio/groio.cpp b/src/gromacs/fileio/groio.cpp index a616f2a041..4a97b9fbd3 100644 --- a/src/gromacs/fileio/groio.cpp +++ b/src/gromacs/fileio/groio.cpp @@ -178,7 +178,7 @@ static gmx_bool get_w_conf(FILE *in, const char *infile, char *title, sscanf(name, "%d", &resnr); sscanf(line+5, "%5s", resname); - if (!oldResFirst || oldres != resnr || strncmp(resname, oldresname, sizeof(resname))) + if (!oldResFirst || oldres != resnr || strncmp(resname, oldresname, sizeof(resname)) != 0) { oldres = resnr; oldResFirst = TRUE; diff --git a/src/gromacs/fileio/tpxio.cpp b/src/gromacs/fileio/tpxio.cpp index 04325d2b81..d33fca80ea 100644 --- a/src/gromacs/fileio/tpxio.cpp +++ b/src/gromacs/fileio/tpxio.cpp @@ -2588,7 +2588,7 @@ static void do_tpxheader(t_fileio *fio, gmx_bool bRead, t_tpxheader *tpx, if (bRead) { gmx_fio_do_string(fio, buf); - if (std::strncmp(buf, "VERSION", 7)) + if (std::strncmp(buf, "VERSION", 7) != 0) { gmx_fatal(FARGS, "Can not read file %s,\n" " this file is from a GROMACS version which is older than 2.0\n" diff --git a/src/gromacs/fileio/xvgr.cpp b/src/gromacs/fileio/xvgr.cpp index e2fdf8c703..149ff854a5 100644 --- a/src/gromacs/fileio/xvgr.cpp +++ b/src/gromacs/fileio/xvgr.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -336,7 +336,7 @@ void xvgr_world(FILE *out, real xmin, real ymin, real xmax, real ymax, } } -static bool stringIsEmpty(const std::string s) +static bool stringIsEmpty(const std::string &s) { return s.empty(); } diff --git a/src/gromacs/gmxana/gmx_awh.cpp b/src/gromacs/gmxana/gmx_awh.cpp index 0c1fe33e9c..f04f00b36e 100644 --- a/src/gromacs/gmxana/gmx_awh.cpp +++ b/src/gromacs/gmxana/gmx_awh.cpp @@ -109,8 +109,8 @@ class OutputFile * \param[in] numBias The total number of AWH biases in the system. * \param[in] biasIndex The index of this bias. */ - OutputFile(std::string filename, - std::string baseTitle, + OutputFile(const std::string &filename, + const std::string &baseTitle, int numBias, int biasIndex); @@ -311,8 +311,8 @@ std::vectormakeLegend(const AwhBiasParams *awhBiasParams, } // namespace -OutputFile::OutputFile(const std::string filename, - const std::string baseTitle, +OutputFile::OutputFile(const std::string &filename, + const std::string &baseTitle, int numBias, int biasIndex) : numDim_(0), diff --git a/src/gromacs/gmxana/gmx_confrms.cpp b/src/gromacs/gmxana/gmx_confrms.cpp index 4c2255fd55..8162397323 100644 --- a/src/gromacs/gmxana/gmx_confrms.cpp +++ b/src/gromacs/gmxana/gmx_confrms.cpp @@ -632,7 +632,7 @@ int gmx_confrms(int argc, char *argv[]) { name1 = *atoms1->atomname[index1[i]]; name2 = *atoms2->atomname[index2[i]]; - if (std::strcmp(name1, name2)) + if (std::strcmp(name1, name2) != 0) { if (warn < 20) { diff --git a/src/gromacs/gmxana/gmx_make_ndx.cpp b/src/gromacs/gmxana/gmx_make_ndx.cpp index ed9a7412f4..cfe5ebaeb5 100644 --- a/src/gromacs/gmxana/gmx_make_ndx.cpp +++ b/src/gromacs/gmxana/gmx_make_ndx.cpp @@ -825,7 +825,7 @@ static int split_chain(const t_atoms *atoms, const rvec *x, while (ca_start < natoms) { - while ((ca_start < natoms) && std::strcmp(*atoms->atomname[ca_start], "CA")) + while ((ca_start < natoms) && std::strcmp(*atoms->atomname[ca_start], "CA") != 0) { ca_start++; } @@ -849,7 +849,7 @@ static int split_chain(const t_atoms *atoms, const rvec *x, { i++; } - while ((i < natoms) && std::strcmp(*atoms->atomname[i], "CA")); + while ((i < natoms) && std::strcmp(*atoms->atomname[i], "CA") != 0); if (i < natoms) { rvec_sub(x[ca_end], x[i], vec); diff --git a/src/gromacs/gmxana/gmx_wham.cpp b/src/gromacs/gmxana/gmx_wham.cpp index fda99b596a..46c39ca92c 100644 --- a/src/gromacs/gmxana/gmx_wham.cpp +++ b/src/gromacs/gmxana/gmx_wham.cpp @@ -446,13 +446,13 @@ static void read_pdo_header(FILE * file, t_UmbrellaHeader * header, t_UmbrellaOp } ist.str(line); ist >> Buffer0 >> Buffer1 >> Buffer2; - if (std::strcmp(Buffer1, "UMBRELLA")) + if (std::strcmp(Buffer1, "UMBRELLA") != 0) { gmx_fatal(FARGS, "This does not appear to be a valid pdo file. Found %s, expected %s\n" "(Found in first line: `%s')\n", Buffer1, "UMBRELLA", line); } - if (std::strcmp(Buffer2, "3.0")) + if (std::strcmp(Buffer2, "3.0") != 0) { gmx_fatal(FARGS, "This does not appear to be a version 3.0 pdo file"); } diff --git a/src/gromacs/gmxpreprocess/gen_vsite.cpp b/src/gromacs/gmxpreprocess/gen_vsite.cpp index 985a4f4fec..80349aaed3 100644 --- a/src/gromacs/gmxpreprocess/gen_vsite.cpp +++ b/src/gromacs/gmxpreprocess/gen_vsite.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. - * Copyright (c) 2013,2014,2015,2016,2017, by the GROMACS development team, led by + * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -386,8 +386,8 @@ static real get_ddb_bond(t_vsitetop *vsitetop, int nvsitetop, } j = 0; while (j < vsitetop[i].nbonds && - ( strcmp(atom1, vsitetop[i].bond[j].atom1) || strcmp(atom2, vsitetop[i].bond[j].atom2)) && - ( strcmp(atom2, vsitetop[i].bond[j].atom1) || strcmp(atom1, vsitetop[i].bond[j].atom2))) + ( strcmp(atom1, vsitetop[i].bond[j].atom1) != 0 || strcmp(atom2, vsitetop[i].bond[j].atom2) != 0) && + ( strcmp(atom2, vsitetop[i].bond[j].atom1) != 0 || strcmp(atom1, vsitetop[i].bond[j].atom2) != 0)) { j++; } @@ -417,12 +417,12 @@ static real get_ddb_angle(t_vsitetop *vsitetop, int nvsitetop, } j = 0; while (j < vsitetop[i].nangles && - ( strcmp(atom1, vsitetop[i].angle[j].atom1) || - strcmp(atom2, vsitetop[i].angle[j].atom2) || - strcmp(atom3, vsitetop[i].angle[j].atom3)) && - ( strcmp(atom3, vsitetop[i].angle[j].atom1) || - strcmp(atom2, vsitetop[i].angle[j].atom2) || - strcmp(atom1, vsitetop[i].angle[j].atom3))) + ( strcmp(atom1, vsitetop[i].angle[j].atom1) != 0 || + strcmp(atom2, vsitetop[i].angle[j].atom2) != 0 || + strcmp(atom3, vsitetop[i].angle[j].atom3) != 0) && + ( strcmp(atom3, vsitetop[i].angle[j].atom1) != 0 || + strcmp(atom2, vsitetop[i].angle[j].atom2) != 0 || + strcmp(atom1, vsitetop[i].angle[j].atom3) != 0)) { j++; } diff --git a/src/gromacs/pulling/pull.cpp b/src/gromacs/pulling/pull.cpp index a5504796b0..947f2df117 100644 --- a/src/gromacs/pulling/pull.cpp +++ b/src/gromacs/pulling/pull.cpp @@ -124,8 +124,8 @@ double pull_conversion_factor_internal2userinput(const t_pull_coord *pcrd) } } -static std::string append_before_extension(std::string pathname, - std::string to_append) +static std::string append_before_extension(const std::string &pathname, + const std::string &to_append) { /* Appends to_append before last '.' in pathname */ size_t extPos = pathname.find_last_of('.'); diff --git a/src/gromacs/trajectoryanalysis/cmdlinerunner.cpp b/src/gromacs/trajectoryanalysis/cmdlinerunner.cpp index 77c348ce58..239bffc799 100644 --- a/src/gromacs/trajectoryanalysis/cmdlinerunner.cpp +++ b/src/gromacs/trajectoryanalysis/cmdlinerunner.cpp @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by + * Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -185,7 +185,7 @@ int RunnerModule::run() // static int TrajectoryAnalysisCommandLineRunner::runAsMain( - int argc, char *argv[], ModuleFactoryMethod factory) + int argc, char *argv[], const ModuleFactoryMethod &factory) { auto runnerFactory = [factory] { @@ -198,7 +198,7 @@ TrajectoryAnalysisCommandLineRunner::runAsMain( void TrajectoryAnalysisCommandLineRunner::registerModule( CommandLineModuleManager *manager, const char *name, - const char *description, ModuleFactoryMethod factory) + const char *description, const ModuleFactoryMethod &factory) { auto runnerFactory = [factory] { diff --git a/src/gromacs/trajectoryanalysis/cmdlinerunner.h b/src/gromacs/trajectoryanalysis/cmdlinerunner.h index b99221cf12..f7661f8739 100644 --- a/src/gromacs/trajectoryanalysis/cmdlinerunner.h +++ b/src/gromacs/trajectoryanalysis/cmdlinerunner.h @@ -1,7 +1,7 @@ /* * This file is part of the GROMACS molecular simulation package. * - * Copyright (c) 2010,2011,2012,2013,2014,2015, by the GROMACS development team, led by + * Copyright (c) 2010,2011,2012,2013,2014,2015,2018, by the GROMACS development team, led by * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl, * and including many others, as listed in the AUTHORS file in the * top-level source directory and at http://www.gromacs.org. @@ -112,7 +112,7 @@ class TrajectoryAnalysisCommandLineRunner * Does not throw. All exceptions are caught and handled internally. */ static int runAsMain(int argc, char *argv[], - ModuleFactoryMethod factory); + const ModuleFactoryMethod &factory); /*! \brief * Registers a command-line module that runs a given module. * @@ -126,7 +126,7 @@ class TrajectoryAnalysisCommandLineRunner */ static void registerModule(CommandLineModuleManager *manager, const char *name, const char *description, - ModuleFactoryMethod factory); + const ModuleFactoryMethod &factory); /*! \brief * Create a command-line module that runs the provided analysis module. * diff --git a/src/gromacs/utility/keyvaluetreetransform.cpp b/src/gromacs/utility/keyvaluetreetransform.cpp index 27d0b674a0..cf4f32f963 100644 --- a/src/gromacs/utility/keyvaluetreetransform.cpp +++ b/src/gromacs/utility/keyvaluetreetransform.cpp @@ -565,7 +565,7 @@ void KeyValueTreeTransformRuleBuilder::setKeyMatchType(StringCompareType keyMatc } void KeyValueTreeTransformRuleBuilder::addTransformToVariant( - std::function transform) + const std::function &transform) { data_->transform_ = [transform] (KeyValueTreeValueBuilder *builder, const KeyValueTreeValue &value) @@ -575,7 +575,7 @@ void KeyValueTreeTransformRuleBuilder::addTransformToVariant( } void KeyValueTreeTransformRuleBuilder::addTransformToObject( - std::function transform) + const std::function &transform) { data_->transform_ = [transform] (KeyValueTreeValueBuilder *builder, const KeyValueTreeValue &value) diff --git a/src/gromacs/utility/keyvaluetreetransform.h b/src/gromacs/utility/keyvaluetreetransform.h index 25bad9ab83..b40cd16182 100644 --- a/src/gromacs/utility/keyvaluetreetransform.h +++ b/src/gromacs/utility/keyvaluetreetransform.h @@ -346,8 +346,8 @@ class KeyValueTreeTransformRuleBuilder void setExpectedType(const std::type_index &type); void setToPath(const KeyValueTreePath &path); void setKeyMatchType(StringCompareType keyMatchType); - void addTransformToVariant(std::function transform); - void addTransformToObject(std::function transform); + void addTransformToVariant(const std::function &transform); + void addTransformToObject(const std::function &transform); class Data; -- 2.11.4.GIT