summaryrefslogtreecommitdiffstats
path: root/src/object/color-profile.cpp
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-06-18 16:54:54 +0000
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-06-18 18:27:11 +0000
commit571f36f1b61d316a2f2ace00fa94ba83ab1ac0a0 (patch)
tree95696a57d31908e2d5b5853b4c84e3d53c700db1 /src/object/color-profile.cpp
parentUpdate pdf-parser.cpp (diff)
downloadinkscape-571f36f1b61d316a2f2ace00fa94ba83ab1ac0a0.tar.gz
inkscape-571f36f1b61d316a2f2ace00fa94ba83ab1ac0a0.zip
Run clang-tidy’s modernize-pass-by-value pass.
This avoids having to pass variables by reference before copying them when calling a constructor.
Diffstat (limited to 'src/object/color-profile.cpp')
-rw-r--r--src/object/color-profile.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/object/color-profile.cpp b/src/object/color-profile.cpp
index 15cdf11fe..38064022a 100644
--- a/src/object/color-profile.cpp
+++ b/src/object/color-profile.cpp
@@ -16,6 +16,7 @@
#include <unistd.h>
#include <cstring>
+#include <utility>
#include <io/sys.h>
#include <io/resource.h>
@@ -179,7 +180,7 @@ cmsHPROFILE ColorProfileImpl::getNULLProfile() {
#endif // defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
-ColorProfile::FilePlusHome::FilePlusHome(Glib::ustring filename, bool isInHome) : filename(filename), isInHome(isInHome) {
+ColorProfile::FilePlusHome::FilePlusHome(Glib::ustring filename, bool isInHome) : filename(std::move(filename)), isInHome(isInHome) {
}
ColorProfile::FilePlusHome::FilePlusHome(const ColorProfile::FilePlusHome &filePlusHome) : FilePlusHome(filePlusHome.filename, filePlusHome.isInHome) {
@@ -194,7 +195,7 @@ bool ColorProfile::FilePlusHome::operator<(FilePlusHome const &other) const {
}
ColorProfile::FilePlusHomeAndName::FilePlusHomeAndName(ColorProfile::FilePlusHome filePlusHome, Glib::ustring name)
- : FilePlusHome(filePlusHome), name(name) {
+ : FilePlusHome(filePlusHome), name(std::move(name)) {
}
bool ColorProfile::FilePlusHomeAndName::operator<(ColorProfile::FilePlusHomeAndName const &other) const {
@@ -634,7 +635,7 @@ bool ColorProfile::GamutCheck(SPColor color)
class ProfileInfo
{
public:
- ProfileInfo( cmsHPROFILE prof, Glib::ustring const & path );
+ ProfileInfo( cmsHPROFILE prof, Glib::ustring path );
Glib::ustring const& getName() {return _name;}
Glib::ustring const& getPath() {return _path;}
@@ -648,8 +649,8 @@ private:
cmsProfileClassSignature _profileClass;
};
-ProfileInfo::ProfileInfo( cmsHPROFILE prof, Glib::ustring const & path ) :
- _path( path ),
+ProfileInfo::ProfileInfo( cmsHPROFILE prof, Glib::ustring path ) :
+ _path(std::move( path )),
_name( getNameFromProfile(prof) ),
_profileSpace( cmsGetColorSpace( prof ) ),
_profileClass( cmsGetDeviceClass( prof ) )