diff --git a/Framework/Kernel/inc/MantidKernel/AttenuationProfile.h b/Framework/Kernel/inc/MantidKernel/AttenuationProfile.h index 324066a9c270bf216eff6b3bafdaaf29a3bdd62a..32b8817f2db04825255fff883de249de7798ce92 100644 --- a/Framework/Kernel/inc/MantidKernel/AttenuationProfile.h +++ b/Framework/Kernel/inc/MantidKernel/AttenuationProfile.h @@ -15,8 +15,8 @@ namespace Kernel { class MANTID_KERNEL_DLL AttenuationProfile { public: - AttenuationProfile(const std::string inputFileName, - const std::string searchPath); + AttenuationProfile(const std::string &inputFileName, + const std::string &searchPath); double getAttenuationCoefficient(const double lambda) const; private: diff --git a/Framework/Kernel/inc/MantidKernel/MaterialXMLParser.h b/Framework/Kernel/inc/MantidKernel/MaterialXMLParser.h index aca27293b2c277cbeae00573ae7d34b8590d11de..927d176675e8ab58a7d917af723357532d8c46c9 100644 --- a/Framework/Kernel/inc/MantidKernel/MaterialXMLParser.h +++ b/Framework/Kernel/inc/MantidKernel/MaterialXMLParser.h @@ -27,7 +27,8 @@ public: static constexpr const char *MATERIAL_TAG = "material"; Material parse(std::istream &istr) const; - Material parse(Poco::XML::Element *node, std::string XMLFilePath = "") const; + Material parse(Poco::XML::Element *node, + const std::string &XMLFilePath = "") const; }; } // namespace Kernel diff --git a/Framework/Kernel/src/AttenuationProfile.cpp b/Framework/Kernel/src/AttenuationProfile.cpp index 82a07243ad36fc89e11e033b5b85112e7c32f038..555f10817d5ffffcdf23f45ce949f117bd0a244e 100644 --- a/Framework/Kernel/src/AttenuationProfile.cpp +++ b/Framework/Kernel/src/AttenuationProfile.cpp @@ -20,8 +20,8 @@ namespace Kernel { * profile data. Filename can be a full path or just file name * @param searchPath :: Path to search for the input file */ -AttenuationProfile::AttenuationProfile(const std::string inputFileName, - const std::string searchPath) { +AttenuationProfile::AttenuationProfile(const std::string &inputFileName, + const std::string &searchPath) { Poco::Path suppliedFileName(inputFileName); Poco::Path inputFilePath; std::string fileExt = suppliedFileName.getExtension(); diff --git a/Framework/Kernel/src/Material.cpp b/Framework/Kernel/src/Material.cpp index 89ce8accac7611c3a4425bd9529e1813127fc73d..caa446ea5121fab6d98fafc5ab4d2a696c3204db 100644 --- a/Framework/Kernel/src/Material.cpp +++ b/Framework/Kernel/src/Material.cpp @@ -182,7 +182,7 @@ void Material::calculateTotalScatterXSection() { } void Material::setAttenuationProfile(AttenuationProfile attenuationOverride) { - m_attenuationOverride = attenuationOverride; + m_attenuationOverride = std::move(attenuationOverride); } /** diff --git a/Framework/Kernel/src/MaterialBuilder.cpp b/Framework/Kernel/src/MaterialBuilder.cpp index 68e22aa36f006844539234213fc89933bff11c8b..cd40c87bf4ea70564bff39254b2223f4e0cae572 100644 --- a/Framework/Kernel/src/MaterialBuilder.cpp +++ b/Framework/Kernel/src/MaterialBuilder.cpp @@ -228,7 +228,7 @@ MaterialBuilder::setAttenuationProfileFilename(std::string filename) { * @param path Path to search */ void MaterialBuilder::setAttenuationSearchPath(std::string path) { - m_attenuationFileSearchPath = path; + m_attenuationFileSearchPath = std::move(path); } /** diff --git a/Framework/Kernel/src/MaterialXMLParser.cpp b/Framework/Kernel/src/MaterialXMLParser.cpp index f1f822fe70c4b0b66631d4d75be047c21833bcdc..bebaafd01d5eccdf9ab78a6f83d14b82f3483e56 100644 --- a/Framework/Kernel/src/MaterialXMLParser.cpp +++ b/Framework/Kernel/src/MaterialXMLParser.cpp @@ -206,7 +206,7 @@ Material MaterialXMLParser::parse(std::istream &istr) const { * @return A new Material object */ Material MaterialXMLParser::parse(Poco::XML::Element *element, - std::string XMLFilePath) const { + const std::string &XMLFilePath) const { using namespace Poco::XML; using NamedNodeMapPtr = AutoPtr<NamedNodeMap>; NamedNodeMapPtr attrs = element->attributes();