summaryrefslogtreecommitdiffstats
path: root/src/preferences.h
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/preferences.h
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/preferences.h')
-rw-r--r--src/preferences.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/preferences.h b/src/preferences.h
index ac9a268a6..6051a0a17 100644
--- a/src/preferences.h
+++ b/src/preferences.h
@@ -17,6 +17,7 @@
#include <cfloat>
#include <glibmm/ustring.h>
#include <map>
+#include <utility>
#include <vector>
#include "xml/repr.h"
@@ -93,7 +94,7 @@ public:
*
* @param path Preference path the observer should watch.
*/
- Observer(Glib::ustring const &path);
+ Observer(Glib::ustring path);
virtual ~Observer();
/**
@@ -227,7 +228,7 @@ public:
*/
Glib::ustring getEntryName() const;
private:
- Entry(Glib::ustring const &path, void const *v) : _pref_path(path), _value(v) {}
+ Entry(Glib::ustring path, void const *v) : _pref_path(std::move(path)), _value(v) {}
Glib::ustring _pref_path;
void const *_value;