diff options
Diffstat (limited to 'src')
38 files changed, 128 insertions, 90 deletions
diff --git a/src/colorspace.h b/src/colorspace.h index 52fc7d63c..9d18492a8 100644 --- a/src/colorspace.h +++ b/src/colorspace.h @@ -36,7 +36,7 @@ class Component { public: Component(); - Component(std::string const &name, std::string const &tip, guint scale); + Component(std::string name, std::string tip, guint scale); std::string name; std::string tip; diff --git a/src/display/curve.cpp b/src/display/curve.cpp index ca7666ee0..211eaaa53 100644 --- a/src/display/curve.cpp +++ b/src/display/curve.cpp @@ -19,6 +19,8 @@ #include <2geom/sbasis-to-bezier.h> #include <2geom/point.h> +#include <utility> + /** * Routines for SPCurve and for its Geom::PathVector */ @@ -33,9 +35,9 @@ SPCurve::SPCurve() _pathv() {} -SPCurve::SPCurve(Geom::PathVector const& pathv) +SPCurve::SPCurve(Geom::PathVector pathv) : _refcount(1), - _pathv(pathv) + _pathv(std::move(pathv)) {} //concat constructor diff --git a/src/display/curve.h b/src/display/curve.h index b79d41ebe..0e6a0ec86 100644 --- a/src/display/curve.h +++ b/src/display/curve.h @@ -25,7 +25,7 @@ class SPCurve { public: /* Constructors */ explicit SPCurve(); - explicit SPCurve(Geom::PathVector const& pathv); + explicit SPCurve(Geom::PathVector pathv); explicit SPCurve(std::list<SPCurve *> const& pathv); static SPCurve * new_from_rect(Geom::Rect const &rect, bool all_four_sides = false); diff --git a/src/event.h b/src/event.h index fe4ed681c..03c64509d 100644 --- a/src/event.h +++ b/src/event.h @@ -16,6 +16,8 @@ #include <glibmm/ustring.h> +#include <utility> + #include "xml/event-fns.h" #include "verbs.h" @@ -30,7 +32,7 @@ namespace Inkscape { struct Event { Event(XML::Event *_event, unsigned int _type=SP_VERB_NONE, Glib::ustring _description="") - : event (_event), type (_type), description (_description) { } + : event (_event), type (_type), description (std::move(_description)) { } virtual ~Event() { sp_repr_free_log (event); } diff --git a/src/libnrtype/FontFactory.h b/src/libnrtype/FontFactory.h index eb1651f27..3dd9e66d7 100644 --- a/src/libnrtype/FontFactory.h +++ b/src/libnrtype/FontFactory.h @@ -11,6 +11,7 @@ #include <functional> #include <algorithm> +#include <utility> #ifdef HAVE_CONFIG_H # include <config.h> @@ -63,7 +64,7 @@ public: StyleNames( Glib::ustring name ) : CssName( name ), DisplayName( name ) {}; StyleNames( Glib::ustring cssname, Glib::ustring displayname ) : - CssName( cssname ), DisplayName( displayname ) {}; + CssName(std::move( cssname )), DisplayName(std::move( displayname )) {}; public: Glib::ustring CssName; // Style as Pango/CSS would write it. diff --git a/src/live_effects/parameter/parameter.cpp b/src/live_effects/parameter/parameter.cpp index 7ca3f04c8..d87bd4d1b 100644 --- a/src/live_effects/parameter/parameter.cpp +++ b/src/live_effects/parameter/parameter.cpp @@ -16,6 +16,8 @@ #include <glibmm/i18n.h> +#include <utility> + #define noLPEREALPARAM_DEBUG namespace Inkscape { @@ -23,15 +25,15 @@ namespace Inkscape { namespace LivePathEffect { -Parameter::Parameter( const Glib::ustring& label, const Glib::ustring& tip, - const Glib::ustring& key, Inkscape::UI::Widget::Registry* wr, +Parameter::Parameter( Glib::ustring label, Glib::ustring tip, + Glib::ustring key, Inkscape::UI::Widget::Registry* wr, Effect* effect ) - : param_key(key), + : param_key(std::move(key)), param_wr(wr), - param_label(label), + param_label(std::move(label)), oncanvas_editable(false), widget_is_visible(true), - param_tooltip(tip), + param_tooltip(std::move(tip)), param_effect(effect) { } diff --git a/src/live_effects/parameter/parameter.h b/src/live_effects/parameter/parameter.h index 7454558db..040955e17 100644 --- a/src/live_effects/parameter/parameter.h +++ b/src/live_effects/parameter/parameter.h @@ -48,9 +48,9 @@ class Effect; class Parameter { public: - Parameter( const Glib::ustring& label, - const Glib::ustring& tip, - const Glib::ustring& key, + Parameter( Glib::ustring label, + Glib::ustring tip, + Glib::ustring key, Inkscape::UI::Widget::Registry* wr, Effect* effect); virtual ~Parameter() = default;; diff --git a/src/live_effects/parameter/togglebutton.cpp b/src/live_effects/parameter/togglebutton.cpp index b5f7f5998..535e43dcf 100644 --- a/src/live_effects/parameter/togglebutton.cpp +++ b/src/live_effects/parameter/togglebutton.cpp @@ -8,6 +8,8 @@ #include "ui/widget/registered-widget.h" #include <glibmm/i18n.h> +#include <utility> + #include "live_effects/parameter/togglebutton.h" #include "live_effects/effect.h" #include "svg/svg.h" @@ -23,11 +25,11 @@ namespace LivePathEffect { ToggleButtonParam::ToggleButtonParam( const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Inkscape::UI::Widget::Registry* wr, - Effect* effect, bool default_value, const Glib::ustring& inactive_label, + Effect* effect, bool default_value, Glib::ustring inactive_label, char const * _icon_active, char const * _icon_inactive, GtkIconSize _icon_size) : Parameter(label, tip, key, wr, effect), value(default_value), defvalue(default_value), - inactive_label(inactive_label), _icon_active(_icon_active), _icon_inactive(_icon_inactive), _icon_size(_icon_size) + inactive_label(std::move(inactive_label)), _icon_active(_icon_active), _icon_inactive(_icon_inactive), _icon_size(_icon_size) { checkwdg = nullptr; } diff --git a/src/live_effects/parameter/togglebutton.h b/src/live_effects/parameter/togglebutton.h index 29ee72203..65fb5db34 100644 --- a/src/live_effects/parameter/togglebutton.h +++ b/src/live_effects/parameter/togglebutton.h @@ -30,7 +30,7 @@ public: Inkscape::UI::Widget::Registry* wr, Effect* effect, bool default_value = false, - const Glib::ustring& inactive_label = "", + Glib::ustring inactive_label = "", char const * icon_active = nullptr, char const * icon_inactive = nullptr, GtkIconSize icon_size = GTK_ICON_SIZE_SMALL_TOOLBAR); 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 ) ) diff --git a/src/preferences.cpp b/src/preferences.cpp index b7242a48d..1c4951d75 100644 --- a/src/preferences.cpp +++ b/src/preferences.cpp @@ -12,6 +12,7 @@ #include <cstring> #include <sstream> +#include <utility> #include <glibmm/fileutils.h> #include <glibmm/convert.h> #include <glibmm/i18n.h> @@ -71,9 +72,9 @@ static void file_add_recent(gchar const *uri) */ class Preferences::PrefNodeObserver : public XML::NodeObserver { public: - PrefNodeObserver(Observer &o, Glib::ustring const &filter) : + PrefNodeObserver(Observer &o, Glib::ustring filter) : _observer(o), - _filter(filter) + _filter(std::move(filter)) {} ~PrefNodeObserver() override = default; void notifyAttributeChanged(XML::Node &node, GQuark name, Util::ptr_shared, Util::ptr_shared) override; @@ -551,8 +552,8 @@ public: bool _is_attr; ///< Whether this Observer watches a single attribute }; -Preferences::Observer::Observer(Glib::ustring const &path) : - observed_path(path), +Preferences::Observer::Observer(Glib::ustring path) : + observed_path(std::move(path)), _data(nullptr) { } 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; diff --git a/src/snap-candidate.h b/src/snap-candidate.h index 72fdbec4b..abecb6280 100644 --- a/src/snap-candidate.h +++ b/src/snap-candidate.h @@ -17,6 +17,7 @@ #include <2geom/point.h> #include <2geom/rect.h> #include <cstdio> +#include <utility> #include "snap-enums.h" @@ -30,12 +31,12 @@ class SnapCandidatePoint public: SnapCandidatePoint() = default;; // only needed / used for resizing() of a vector in seltrans.cpp; do not use uninitialized instances! - SnapCandidatePoint(Geom::Point const &point, Inkscape::SnapSourceType const source, long const source_num, Inkscape::SnapTargetType const target, Geom::OptRect const &bbox) + SnapCandidatePoint(Geom::Point const &point, Inkscape::SnapSourceType const source, long const source_num, Inkscape::SnapTargetType const target, Geom::OptRect bbox) : _point(point), _source_type(source), _target_type(target), _source_num(source_num), - _target_bbox(bbox), + _target_bbox(std::move(bbox)), _dist() { }; @@ -131,7 +132,7 @@ class SnapCandidatePath public: SnapCandidatePath(Geom::PathVector* path, SnapTargetType target, Geom::OptRect bbox, bool edited = false) - : path_vector(path), target_type(target), target_bbox(bbox), currently_being_edited(edited) {}; + : path_vector(path), target_type(target), target_bbox(std::move(bbox)), currently_being_edited(edited) {}; ~SnapCandidatePath() = default;; Geom::PathVector* path_vector; diff --git a/src/snapped-point.cpp b/src/snapped-point.cpp index 6d1d7c2a8..3bca399a3 100644 --- a/src/snapped-point.cpp +++ b/src/snapped-point.cpp @@ -10,6 +10,8 @@ */ #include <gtk/gtk.h> + +#include <utility> #include "snapped-point.h" #include "preferences.h" @@ -29,7 +31,7 @@ Inkscape::SnappedPoint::SnappedPoint(Geom::Point const &p, SnapSourceType const _second_distance (Geom::infinity()), _second_tolerance (1), _second_always_snap (false), - _target_bbox(target_bbox), + _target_bbox(std::move(target_bbox)), _pointer_distance (Geom::infinity()) { } diff --git a/src/style-internal.h b/src/style-internal.h index 6ec5038f1..869f862af 100644 --- a/src/style-internal.h +++ b/src/style-internal.h @@ -17,6 +17,7 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#include <utility> #include <vector> #include <map> @@ -125,8 +126,8 @@ class SPIBase { public: - SPIBase( Glib::ustring const &name, bool inherits = true ) - : name(name), + SPIBase( Glib::ustring name, bool inherits = true ) + : name(std::move(name)), inherits(inherits), set(false), inherit(false), diff --git a/src/svg-view-slideshow.cpp b/src/svg-view-slideshow.cpp index ba59be2ef..3bb800292 100644 --- a/src/svg-view-slideshow.cpp +++ b/src/svg-view-slideshow.cpp @@ -35,6 +35,8 @@ #include <gtkmm/image.h> #include <gtkmm/main.h> +#include <utility> + #include "document.h" #include "ui/icon-names.h" #include "ui/monitor.h" @@ -45,8 +47,8 @@ #include "svg-view-widget.h" -SPSlideShow::SPSlideShow(std::vector<Glib::ustring> const &slides, bool full_screen, int timer, double scale) - : _slides(slides) +SPSlideShow::SPSlideShow(std::vector<Glib::ustring> slides, bool full_screen, int timer, double scale) + : _slides(std::move(slides)) , _current(0) , _doc(SPDocument::createNewDoc(_slides[0].c_str(), true, false)) , _fullscreen(full_screen) diff --git a/src/svg-view-slideshow.h b/src/svg-view-slideshow.h index bd0881021..9de62ae9e 100644 --- a/src/svg-view-slideshow.h +++ b/src/svg-view-slideshow.h @@ -36,7 +36,7 @@ */ class SPSlideShow : public Gtk::ApplicationWindow { public: - SPSlideShow(std::vector<Glib::ustring> const &slides, + SPSlideShow(std::vector<Glib::ustring> slides, bool fullscreen, int timer, double scale); diff --git a/src/text-tag-attributes.h b/src/text-tag-attributes.h index da054518a..3b3ca0568 100644 --- a/src/text-tag-attributes.h +++ b/src/text-tag-attributes.h @@ -1,6 +1,7 @@ #ifndef INKSCAPE_TEXT_TAG_ATTRIBUTES_H #define INKSCAPE_TEXT_TAG_ATTRIBUTES_H +#include <utility> #include <vector> #include <glib.h> #include "libnrtype/Layout-TNG.h" @@ -23,8 +24,8 @@ element. class TextTagAttributes { public: TextTagAttributes() = default; - TextTagAttributes(Inkscape::Text::Layout::OptionalTextTagAttrs const &attrs) - : attributes(attrs) {} + TextTagAttributes(Inkscape::Text::Layout::OptionalTextTagAttrs attrs) + : attributes(std::move(attrs)) {} /// Fill in all the fields of #attributes from the given node. void readFrom(Inkscape::XML::Node const *node); diff --git a/src/trace/trace.h b/src/trace/trace.h index 9f680752b..e6768cb4e 100644 --- a/src/trace/trace.h +++ b/src/trace/trace.h @@ -17,6 +17,7 @@ #include <glibmm/refptr.h> #include <gdkmm/pixbuf.h> +#include <utility> #include <vector> class SPImage; @@ -40,11 +41,11 @@ public: /** * */ - TracingEngineResult(const std::string &theStyle, - const std::string &thePathData, + TracingEngineResult(std::string theStyle, + std::string thePathData, long theNodeCount) : - style(theStyle), - pathData(thePathData), + style(std::move(theStyle)), + pathData(std::move(thePathData)), nodeCount(theNodeCount) {} diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp index 02893d5e1..ad69bb59c 100644 --- a/src/ui/dialog/align-and-distribute.cpp +++ b/src/ui/dialog/align-and-distribute.cpp @@ -25,6 +25,8 @@ #include <2geom/transforms.h> +#include <utility> + #include "align-and-distribute.h" #include "desktop.h" @@ -56,13 +58,13 @@ namespace Dialog { /////////helper classes////////////////////////////////// -Action::Action(const Glib::ustring &id, +Action::Action(Glib::ustring id, const Glib::ustring &tiptext, guint row, guint column, Gtk::Grid &parent, AlignAndDistribute &dialog): _dialog(dialog), - _id(id), + _id(std::move(id)), _parent(parent) { Gtk::Image* pIcon = Gtk::manage(new Gtk::Image()); diff --git a/src/ui/dialog/align-and-distribute.h b/src/ui/dialog/align-and-distribute.h index f8099908d..53b8c1a0f 100644 --- a/src/ui/dialog/align-and-distribute.h +++ b/src/ui/dialog/align-and-distribute.h @@ -139,7 +139,7 @@ public : enum AlignTarget { LAST=0, FIRST, BIGGEST, SMALLEST, PAGE, DRAWING, SELECTION }; enum AlignTargetNode { LAST_NODE=0, FIRST_NODE, MID_NODE, MIN_NODE, MAX_NODE }; - Action(const Glib::ustring &id, + Action(Glib::ustring id, const Glib::ustring &tiptext, guint row, guint column, Gtk::Grid &parent, diff --git a/src/ui/dialog/dialog.cpp b/src/ui/dialog/dialog.cpp index 0cee7f1d6..a5037bbbf 100644 --- a/src/ui/dialog/dialog.cpp +++ b/src/ui/dialog/dialog.cpp @@ -22,6 +22,8 @@ #include <gdk/gdkkeysyms.h> +#include <utility> + #include "inkscape.h" #include "ui/monitor.h" #include "ui/tools/tool-base.h" @@ -49,14 +51,14 @@ gboolean sp_retransientize_again(gpointer dlgPtr) //===================================================================== Dialog::Dialog(Behavior::BehaviorFactory behavior_factory, const char *prefs_path, int verb_num, - Glib::ustring const &apply_label) + Glib::ustring apply_label) : _user_hidden(false), _hiddenF12(false), retransientize_suppress(false), _prefs_path(prefs_path), _verb_num(verb_num), _title(), - _apply_label(apply_label), + _apply_label(std::move(apply_label)), _desktop(nullptr), _is_active_desktop(true), _behavior(nullptr) diff --git a/src/ui/dialog/dialog.h b/src/ui/dialog/dialog.h index 8f94c544b..c0f0a53bd 100644 --- a/src/ui/dialog/dialog.h +++ b/src/ui/dialog/dialog.h @@ -64,7 +64,7 @@ public: * @param verb_num the dialog verb. */ Dialog(Behavior::BehaviorFactory behavior_factory, const char *prefs_path = nullptr, - int verb_num = 0, Glib::ustring const &apply_label = ""); + int verb_num = 0, Glib::ustring apply_label = ""); virtual ~Dialog(); diff --git a/src/ui/dialog/filter-effects-dialog.cpp b/src/ui/dialog/filter-effects-dialog.cpp index db930fe8e..20ce89115 100644 --- a/src/ui/dialog/filter-effects-dialog.cpp +++ b/src/ui/dialog/filter-effects-dialog.cpp @@ -38,6 +38,8 @@ #include <glibmm/main.h> #include <glibmm/convert.h> +#include <utility> + #include "desktop.h" #include "dialog-manager.h" #include "document-undo.h" @@ -100,11 +102,11 @@ class CheckButtonAttr : public Gtk::CheckButton, public AttrWidget { public: CheckButtonAttr(bool def, const Glib::ustring& label, - const Glib::ustring& tv, const Glib::ustring& fv, + Glib::ustring tv, Glib::ustring fv, const SPAttributeEnum a, char* tip_text) : Gtk::CheckButton(label), AttrWidget(a, def), - _true_val(tv), _false_val(fv) + _true_val(std::move(tv)), _false_val(std::move(fv)) { signal_toggled().connect(signal_attr_changed().make_slot()); if (tip_text) { @@ -736,7 +738,7 @@ public: typedef sigc::slot<void, const AttrWidget*> SetAttrSlot; Settings(FilterEffectsDialog& d, Gtk::Box& b, SetAttrSlot slot, const int maxtypes) - : _dialog(d), _set_attr_slot(slot), _current_type(-1), _max_types(maxtypes) + : _dialog(d), _set_attr_slot(std::move(slot)), _current_type(-1), _max_types(maxtypes) { _groups.resize(_max_types); _attrwidgets.resize(_max_types); diff --git a/src/ui/dialog/pixelartdialog.cpp b/src/ui/dialog/pixelartdialog.cpp index 198737eb8..2c1201db4 100644 --- a/src/ui/dialog/pixelartdialog.cpp +++ b/src/ui/dialog/pixelartdialog.cpp @@ -53,6 +53,8 @@ #ifdef HAVE_OPENMP #include <omp.h> + +#include <utility> #endif // HAVE_OPENMP namespace Inkscape { @@ -79,7 +81,7 @@ private: struct Output { Output(Tracer::Splines splines, SVGLength x, SVGLength y) : - splines(splines), x(x), y(y) + splines(std::move(splines)), x(x), y(y) {} Tracer::Splines splines; diff --git a/src/ui/dialog/styledialog.cpp b/src/ui/dialog/styledialog.cpp index db284466d..9171dd9ce 100644 --- a/src/ui/dialog/styledialog.cpp +++ b/src/ui/dialog/styledialog.cpp @@ -28,6 +28,7 @@ #include <glibmm/regex.h> #include <map> +#include <utility> //#define DEBUG_STYLEDIALOG @@ -1045,7 +1046,7 @@ class PropertyData { public: PropertyData() = default;; - PropertyData(Glib::ustring name) : _name(name) {}; + PropertyData(Glib::ustring name) : _name(std::move(name)) {}; void _setSheetValue(Glib::ustring value) { _sheetValue = value; }; void _setAttrValue(Glib::ustring value) { _attrValue = value; }; diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp index 5d043ffcf..ce4a02a2b 100644 --- a/src/ui/tool/path-manipulator.cpp +++ b/src/ui/tool/path-manipulator.cpp @@ -13,6 +13,8 @@ #include <2geom/bezier-utils.h> #include <2geom/path-sink.h> +#include <utility> + #include "display/sp-canvas.h" #include "display/sp-canvas-util.h" #include "display/curve.h" @@ -117,7 +119,7 @@ PathManipulator::PathManipulator(MultiPathManipulator &mpm, SPPath *path, , _live_outline(true) , _live_objects(true) , _is_bspline(false) - , _lpe_key(lpe_key) + , _lpe_key(std::move(lpe_key)) { if (_lpe_key.empty()) { _i2d_transform = path->i2dt_affine(); diff --git a/src/ui/widget/color-icc-selector.cpp b/src/ui/widget/color-icc-selector.cpp index bd1cfde1b..9e1a0c05b 100644 --- a/src/ui/widget/color-icc-selector.cpp +++ b/src/ui/widget/color-icc-selector.cpp @@ -3,6 +3,7 @@ #endif #include <set> +#include <utility> #include <gtkmm/adjustment.h> #include <glibmm/i18n.h> @@ -115,9 +116,9 @@ colorspace::Component::Component() { } -colorspace::Component::Component(std::string const &name, std::string const &tip, guint scale) - : name(name) - , tip(tip) +colorspace::Component::Component(std::string name, std::string tip, guint scale) + : name(std::move(name)) + , tip(std::move(tip)) , scale(scale) { } @@ -217,8 +218,8 @@ class ComponentUI { { } - ComponentUI(colorspace::Component const &component) - : _component(component) + ComponentUI(colorspace::Component component) + : _component(std::move(component)) , _adj(nullptr) , _slider(nullptr) , _btn(nullptr) diff --git a/src/ui/widget/ink-select-one-action.cpp b/src/ui/widget/ink-select-one-action.cpp index 9ab4a7f45..b85e9c189 100644 --- a/src/ui/widget/ink-select-one-action.cpp +++ b/src/ui/widget/ink-select-one-action.cpp @@ -20,6 +20,7 @@ #include "ink-select-one-action.h" #include <iostream> +#include <utility> #include <gtkmm/toolitem.h> #include <gtkmm/menuitem.h> #include <gtkmm/radioaction.h> @@ -49,7 +50,7 @@ InkSelectOneAction::InkSelectOneAction (const Glib::ustring &name, _group_label( group_label ), _tooltip( tooltip ), _stock_id( stock_id ), - _store (store), + _store (std::move(store)), _use_radio (true), _use_label (true), _use_icon (true), diff --git a/src/ui/widget/ink-spinscale.cpp b/src/ui/widget/ink-spinscale.cpp index 87a2bd11c..3e075978b 100644 --- a/src/ui/widget/ink-spinscale.cpp +++ b/src/ui/widget/ink-spinscale.cpp @@ -25,6 +25,7 @@ #include <gdk/gdk.h> #include <iostream> +#include <utility> InkScale::InkScale(Glib::RefPtr<Gtk::Adjustment> adjustment, Gtk::SpinButton* spinbutton) : Glib::ObjectBase("InkScale") @@ -224,7 +225,7 @@ InkSpinScale::InkSpinScale(double value, double lower, } InkSpinScale::InkSpinScale(Glib::RefPtr<Gtk::Adjustment> adjustment) - : _adjustment(adjustment) + : _adjustment(std::move(adjustment)) { set_name("InkSpinScale"); diff --git a/src/util/ege-tags.cpp b/src/util/ege-tags.cpp index 3b9f68df8..f3955129a 100644 --- a/src/util/ege-tags.cpp +++ b/src/util/ege-tags.cpp @@ -47,6 +47,7 @@ #include <set> #include <algorithm> #include <functional> +#include <utility> #include "ege-tags.h" @@ -55,9 +56,9 @@ namespace ege { -Label::Label(std::string const& lang, std::string const& value) : - lang(lang), - value(value) +Label::Label(std::string lang, std::string value) : + lang(std::move(lang)), + value(std::move(value)) { } @@ -69,8 +70,8 @@ Label::~Label() Tag::~Tag() = default; -Tag::Tag(std::string const& key) : - key(key) +Tag::Tag(std::string key) : + key(std::move(key)) { } diff --git a/src/util/ege-tags.h b/src/util/ege-tags.h index 7280e1f6a..a481c97e1 100644 --- a/src/util/ege-tags.h +++ b/src/util/ege-tags.h @@ -54,7 +54,7 @@ class Label { public: Label(); - Label(std::string const& lang, std::string const& value); + Label(std::string lang, std::string value); ~Label(); std::string lang; @@ -65,7 +65,7 @@ class Tag { public: Tag(); - Tag(std::string const& key); + Tag(std::string key); ~Tag(); std::string key; diff --git a/src/util/units.cpp b/src/util/units.cpp index ffa2681c6..340d3f697 100644 --- a/src/util/units.cpp +++ b/src/util/units.cpp @@ -17,6 +17,7 @@ #include <cerrno> #include <iomanip> #include <iostream> +#include <utility> #include <glib.h> #include <glibmm/regex.h> #include <glibmm/fileutils.h> @@ -164,16 +165,16 @@ Unit::Unit() : Unit::Unit(UnitType type, double factor, - Glib::ustring const &name, - Glib::ustring const &name_plural, - Glib::ustring const &abbr, - Glib::ustring const &description) + Glib::ustring name, + Glib::ustring name_plural, + Glib::ustring abbr, + Glib::ustring description) : type(type) , factor(factor) - , name(name) - , name_plural(name_plural) - , abbr(abbr) - , description(description) + , name(std::move(name)) + , name_plural(std::move(name_plural)) + , abbr(std::move(abbr)) + , description(std::move(description)) { g_return_if_fail(factor <= 0); } diff --git a/src/util/units.h b/src/util/units.h index fa70058ba..e4530d0c3 100644 --- a/src/util/units.h +++ b/src/util/units.h @@ -43,10 +43,10 @@ public: Unit(); Unit(UnitType type, double factor, - Glib::ustring const &name, - Glib::ustring const &name_plural, - Glib::ustring const &abbr, - Glib::ustring const &description); + Glib::ustring name, + Glib::ustring name_plural, + Glib::ustring abbr, + Glib::ustring description); void clear(); diff --git a/src/util/ziptool.cpp b/src/util/ziptool.cpp index fe64bad6f..4408c3daa 100644 --- a/src/util/ziptool.cpp +++ b/src/util/ziptool.cpp @@ -36,6 +36,7 @@ #include <ctime> #include <string> +#include <utility> #include "ziptool.h" @@ -1903,11 +1904,11 @@ ZipEntry::ZipEntry() : /** * */ -ZipEntry::ZipEntry(const std::string &fileNameArg, - const std::string &commentArg) : +ZipEntry::ZipEntry(std::string fileNameArg, + std::string commentArg) : crc (0L), - fileName (fileNameArg), - comment (commentArg), + fileName (std::move(fileNameArg)), + comment (std::move(commentArg)), compressionMethod (8), compressedData (), uncompressedData (), diff --git a/src/util/ziptool.h b/src/util/ziptool.h index dbae8ac60..bcaec11f6 100644 --- a/src/util/ziptool.h +++ b/src/util/ziptool.h @@ -251,8 +251,8 @@ public: /** * */ - ZipEntry(const std::string &fileName, - const std::string &comment); + ZipEntry(std::string fileName, + std::string comment); /** * diff --git a/src/widgets/ege-paint-def.cpp b/src/widgets/ege-paint-def.cpp index 8ed6bbfc5..83492329c 100644 --- a/src/widgets/ege-paint-def.cpp +++ b/src/widgets/ege-paint-def.cpp @@ -44,6 +44,7 @@ #include <sstream> #include <cstring> #include <cstdio> +#include <utility> #include <glibmm/i18n.h> #include <glibmm/stringutils.h> @@ -93,8 +94,8 @@ PaintDef::PaintDef( ColorType type ) : } } -PaintDef::PaintDef( unsigned int r, unsigned int g, unsigned int b, const std::string& description ) : - descr(description), +PaintDef::PaintDef( unsigned int r, unsigned int g, unsigned int b, std::string description ) : + descr(std::move(description)), type(RGB), r(r), g(g), diff --git a/src/widgets/ege-paint-def.h b/src/widgets/ege-paint-def.h index 856146019..c26fde1b2 100644 --- a/src/widgets/ege-paint-def.h +++ b/src/widgets/ege-paint-def.h @@ -56,7 +56,7 @@ public: PaintDef(); PaintDef(ColorType type); - PaintDef( unsigned int r, unsigned int g, unsigned int b, const std::string& description ); + PaintDef( unsigned int r, unsigned int g, unsigned int b, std::string description ); virtual ~PaintDef(); PaintDef( PaintDef const &other ); |
