From ef59716bfab870d3193fa9670f2cacc3cca39595 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Thu, 17 Jan 2013 19:23:15 +0100 Subject: const methods (bzr r12037) --- src/live_effects/effect.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 3b57de25c..4d6fb0979 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -309,7 +309,7 @@ Effect::getName() } EffectType -Effect::effectType() { +Effect::effectType() const { return lpeobj->effecttype; } @@ -663,7 +663,7 @@ Effect::transform_multiply(Geom::Affine const& postmul, bool set) } bool -Effect::providesKnotholder() +Effect::providesKnotholder() const { // does the effect actively provide any knotholder entities of its own? if (_provides_knotholder_entities) { @@ -671,7 +671,7 @@ Effect::providesKnotholder() } // otherwise: are there any parameters that have knotholderentities? - for (std::vector::iterator p = param_vector.begin(); p != param_vector.end(); ++p) { + for (std::vector::const_iterator p = param_vector.begin(); p != param_vector.end(); ++p) { if ((*p)->providesKnotHolderEntities()) { return true; } -- cgit v1.2.3 From a70c7514a9dd5fc8d5eabe486141dfd259d2ed55 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Thu, 17 Jan 2013 20:00:40 +0100 Subject: more const happiness (and removal of duplicate code in sp-object.h) (bzr r12038) --- src/live_effects/effect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 4d6fb0979..26095d84b 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -317,7 +317,7 @@ Effect::effectType() const { * Is performed a single time when the effect is freshly applied to a path */ void -Effect::doOnApply (SPLPEItem */*lpeitem*/) +Effect::doOnApply (SPLPEItem const*/*lpeitem*/) { } @@ -643,7 +643,7 @@ Effect::editNextParamOncanvas(SPItem * item, SPDesktop * desktop) * The nice thing about this is that this function can use knowledge of the original path and set things accordingly for example to the size or origin of the original path! */ void -Effect::resetDefaults(SPItem * /*item*/) +Effect::resetDefaults(SPItem const* /*item*/) { std::vector::iterator p; for (p = param_vector.begin(); p != param_vector.end(); ++p) { -- cgit v1.2.3 From bf58d4cb9c86682d1416c64378d1cfc8a95554e8 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Thu, 17 Jan 2013 21:02:50 +0100 Subject: const .... (bzr r12039) --- src/live_effects/effect.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/live_effects/effect.cpp') diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp index 26095d84b..b0be02b95 100644 --- a/src/live_effects/effect.cpp +++ b/src/live_effects/effect.cpp @@ -300,7 +300,7 @@ Effect::~Effect() } Glib::ustring -Effect::getName() +Effect::getName() const { if (lpeobj->effecttype_set && LPETypeConverter.is_valid_id(lpeobj->effecttype) ) return Glib::ustring( _(LPETypeConverter.get_label(lpeobj->effecttype).c_str()) ); @@ -325,7 +325,7 @@ Effect::doOnApply (SPLPEItem const*/*lpeitem*/) * Is performed each time before the effect is updated. */ void -Effect::doBeforeEffect (SPLPEItem */*lpeitem*/) +Effect::doBeforeEffect (SPLPEItem const*/*lpeitem*/) { //Do nothing for simple effects } @@ -370,7 +370,7 @@ Effect::writeParamsToSVG() { * your LPE. But don't forget to call the parent method so that is_ready is set to true! */ void -Effect::acceptParamPath (SPPath */*param_path*/) { +Effect::acceptParamPath (SPPath const*/*param_path*/) { setReady(); } @@ -424,7 +424,7 @@ Effect::doEffect_pwd2 (Geom::Piecewise > const & pwd2_in) } void -Effect::readallParameters(Inkscape::XML::Node * repr) +Effect::readallParameters(Inkscape::XML::Node const* repr) { std::vector::iterator it = param_vector.begin(); while (it != param_vector.end()) { @@ -491,7 +491,7 @@ Effect::addHandles(KnotHolder *knotholder, SPDesktop *desktop, SPItem *item) { * This is the function called by external code like SPLPEItem. */ std::vector -Effect::getHelperPaths(SPLPEItem *lpeitem) +Effect::getHelperPaths(SPLPEItem const* lpeitem) { std::vector hp_vec; @@ -524,7 +524,7 @@ Effect::getHelperPaths(SPLPEItem *lpeitem) * This function should be overwritten by derived effects if they want to provide their own helperpaths. */ void -Effect::addCanvasIndicators(SPLPEItem */*lpeitem*/, std::vector &/*hp_vec*/) +Effect::addCanvasIndicators(SPLPEItem const*/*lpeitem*/, std::vector &/*hp_vec*/) { } -- cgit v1.2.3