summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiam P. White <inkscapebrony@gmail.com>2014-09-14 17:46:13 +0000
committerLiam P. White <inkscapebrony@gmail.com>2014-09-14 17:46:13 +0000
commitea9f5f43ee77d3b0483c583fb1ddbc3e28a77a13 (patch)
treec50cd528e7ab3006510bab0f4f624ce6906f9f4a /src
parentSmall cleanup (diff)
downloadinkscape-ea9f5f43ee77d3b0483c583fb1ddbc3e28a77a13.tar.gz
inkscape-ea9f5f43ee77d3b0483c583fb1ddbc3e28a77a13.zip
Warnings cleanup; formatting
(bzr r13341.1.206)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/effect.cpp4
-rw-r--r--src/live_effects/lpe-attach-path.cpp18
-rw-r--r--src/live_effects/lpe-jointype.cpp108
-rw-r--r--src/live_effects/lpe-jointype.h40
-rw-r--r--src/live_effects/lpe-taperstroke.cpp10
-rw-r--r--src/live_effects/parameter/originalpatharray.cpp9
-rw-r--r--src/live_effects/parameter/originalpatharray.h3
7 files changed, 93 insertions, 99 deletions
diff --git a/src/live_effects/effect.cpp b/src/live_effects/effect.cpp
index 895408707..3e3f8540a 100644
--- a/src/live_effects/effect.cpp
+++ b/src/live_effects/effect.cpp
@@ -407,11 +407,11 @@ Effect::doBeforeEffect (SPLPEItem const*/*lpeitem*/)
//Do nothing for simple effects
}
-void Effect::doAfterEffect (SPLPEItem const* lpeitem)
+void Effect::doAfterEffect (SPLPEItem const* /*lpeitem*/)
{
}
-void Effect::doOnRemove (SPLPEItem const* lpeitem)
+void Effect::doOnRemove (SPLPEItem const* /*lpeitem*/)
{
}
diff --git a/src/live_effects/lpe-attach-path.cpp b/src/live_effects/lpe-attach-path.cpp
index 2880cbc37..768c66ee2 100644
--- a/src/live_effects/lpe-attach-path.cpp
+++ b/src/live_effects/lpe-attach-path.cpp
@@ -35,15 +35,15 @@ LPEAttachPath::LPEAttachPath(LivePathEffectObject *lpeobject) :
end_path_curve_start(_("End path curve start:"), _("Starting curve"), "endcurvestart", &wr, this, Geom::Point(20,0)/*, true*/),
end_path_curve_end(_("End path curve end:"), _("Ending curve"), "endcurveend", &wr, this, Geom::Point(20,0)/*, true*/)
{
- registerParameter( dynamic_cast<Parameter *>(&start_path) );
- registerParameter( dynamic_cast<Parameter *>(&start_path_position) );
- registerParameter( dynamic_cast<Parameter *>(&start_path_curve_start) );
- registerParameter( dynamic_cast<Parameter *>(&start_path_curve_end) );
+ registerParameter(&start_path);
+ registerParameter(&start_path_position);
+ registerParameter(&start_path_curve_start);
+ registerParameter(&start_path_curve_end);
- registerParameter( dynamic_cast<Parameter *>(&end_path) );
- registerParameter( dynamic_cast<Parameter *>(&end_path_position) );
- registerParameter( dynamic_cast<Parameter *>(&end_path_curve_start) );
- registerParameter( dynamic_cast<Parameter *>(&end_path_curve_end) );
+ registerParameter(&end_path);
+ registerParameter(&end_path_position);
+ registerParameter(&end_path_curve_start);
+ registerParameter(&end_path_curve_end);
//perceived_path = true;
show_orig_path = true;
@@ -56,7 +56,7 @@ LPEAttachPath::~LPEAttachPath()
}
-void LPEAttachPath::resetDefaults(SPItem const * item)
+void LPEAttachPath::resetDefaults(SPItem const * /*item*/)
{
curve_start_previous_origin = start_path_curve_end.getOrigin();
curve_end_previous_origin = end_path_curve_end.getOrigin();
diff --git a/src/live_effects/lpe-jointype.cpp b/src/live_effects/lpe-jointype.cpp
index 7c7581d9e..bf2526986 100644
--- a/src/live_effects/lpe-jointype.cpp
+++ b/src/live_effects/lpe-jointype.cpp
@@ -1,11 +1,11 @@
- /* Authors:
- *
- * Liam P White
- *
- * Copyright (C) 2014 Authors
- *
- * Released under GNU GPL v2, read the file 'COPYING' for more information
- */
+/* Authors:
+*
+* Liam P White
+*
+* Copyright (C) 2014 Authors
+*
+* Released under GNU GPL v2, read the file 'COPYING' for more information
+*/
#include "live_effects/parameter/enum.h"
#include "live_effects/pathoutlineprovider.h"
@@ -28,49 +28,49 @@ namespace Inkscape {
namespace LivePathEffect {
static const Util::EnumData<unsigned> JoinTypeData[] = {
- {LINEJOIN_STRAIGHT, N_("Beveled"), "bevel"},
+ {LINEJOIN_STRAIGHT, N_("Beveled"), "bevel"},
{LINEJOIN_ROUND, N_("Rounded"), "round"},
{LINEJOIN_POINTY, N_("Miter"), "miter"},
- {LINEJOIN_REFLECTED, N_("Reflected"), "extrapolated"},
+ {LINEJOIN_REFLECTED, N_("Reflected"), "extrapolated"},
{LINEJOIN_EXTRAPOLATED, N_("Extrapolated arc"), "extrp_arc"}
};
static const Util::EnumData<unsigned> CapTypeData[] = {
- {BUTT_STRAIGHT, N_("Butt"), "butt"},
- {BUTT_ROUND, N_("Rounded"), "round"},
- {BUTT_SQUARE, N_("Square"), "square"},
- {BUTT_POINTY, N_("Peak"), "peak"},
- {BUTT_LEANED, N_("Leaned"), "leaned"}
+ {BUTT_STRAIGHT, N_("Butt"), "butt"},
+ {BUTT_ROUND, N_("Rounded"), "round"},
+ {BUTT_SQUARE, N_("Square"), "square"},
+ {BUTT_POINTY, N_("Peak"), "peak"},
+ {BUTT_LEANED, N_("Leaned"), "leaned"}
};
static const Util::EnumDataConverter<unsigned> CapTypeConverter(CapTypeData, sizeof(CapTypeData)/sizeof(*CapTypeData));
static const Util::EnumDataConverter<unsigned> JoinTypeConverter(JoinTypeData, sizeof(JoinTypeData)/sizeof(*JoinTypeData));
LPEJoinType::LPEJoinType(LivePathEffectObject *lpeobject) :
- Effect(lpeobject),
- line_width(_("Line width"), _("Thickness of the stroke"), "line_width", &wr, this, 1.),
- linecap_type(_("Line cap"), _("The end shape of the stroke"), "linecap_type", CapTypeConverter, &wr, this, butt_straight),
- linejoin_type(_("Join:"), _("Determines the shape of the path's corners"), "linejoin_type", JoinTypeConverter, &wr, this, LINEJOIN_EXTRAPOLATED),
- start_lean(_("Start path lean"), _("Start path lean"), "start_lean", &wr, this, 0.),
- end_lean(_("End path lean"), _("End path lean"), "end_lean", &wr, this, 0.),
- miter_limit(_("Miter limit:"), _("Maximum length of the miter join (in units of stroke width)"), "miter_limit", &wr, this, 100.),
- attempt_force_join(_("Force miter"), _("Overrides the miter limit and forces a join."), "attempt_force_join", &wr, this, true)
+ Effect(lpeobject),
+ line_width(_("Line width"), _("Thickness of the stroke"), "line_width", &wr, this, 1.),
+ linecap_type(_("Line cap"), _("The end shape of the stroke"), "linecap_type", CapTypeConverter, &wr, this, butt_straight),
+ linejoin_type(_("Join:"), _("Determines the shape of the path's corners"), "linejoin_type", JoinTypeConverter, &wr, this, LINEJOIN_EXTRAPOLATED),
+ start_lean(_("Start path lean"), _("Start path lean"), "start_lean", &wr, this, 0.),
+ end_lean(_("End path lean"), _("End path lean"), "end_lean", &wr, this, 0.),
+ miter_limit(_("Miter limit:"), _("Maximum length of the miter join (in units of stroke width)"), "miter_limit", &wr, this, 100.),
+ attempt_force_join(_("Force miter"), _("Overrides the miter limit and forces a join."), "attempt_force_join", &wr, this, true)
{
- show_orig_path = true;
- registerParameter(&linecap_type);
- registerParameter(&line_width);
- registerParameter(&linejoin_type);
- registerParameter(&start_lean);
- registerParameter(&end_lean);
- registerParameter(&miter_limit);
- registerParameter(&attempt_force_join);
- was_initialized = false;
- start_lean.param_set_range(-1,1);
- start_lean.param_set_increments(0.1, 0.1);
- start_lean.param_set_digits(4);
- end_lean.param_set_range(-1,1);
- end_lean.param_set_increments(0.1, 0.1);
- end_lean.param_set_digits(4);
+ show_orig_path = true;
+ registerParameter(&linecap_type);
+ registerParameter(&line_width);
+ registerParameter(&linejoin_type);
+ registerParameter(&start_lean);
+ registerParameter(&end_lean);
+ registerParameter(&miter_limit);
+ registerParameter(&attempt_force_join);
+ was_initialized = false;
+ start_lean.param_set_range(-1,1);
+ start_lean.param_set_increments(0.1, 0.1);
+ start_lean.param_set_digits(4);
+ end_lean.param_set_range(-1,1);
+ end_lean.param_set_increments(0.1, 0.1);
+ end_lean.param_set_digits(4);
}
LPEJoinType::~LPEJoinType()
@@ -82,10 +82,10 @@ LPEJoinType::~LPEJoinType()
void LPEJoinType::doOnApply(SPLPEItem const* lpeitem)
{
- if (SP_IS_SHAPE(lpeitem)) {
+ if (SP_IS_SHAPE(lpeitem)) {
SPLPEItem* item = const_cast<SPLPEItem*>(lpeitem);
double width = (lpeitem && lpeitem->style) ? lpeitem->style->stroke_width.computed : 1.;
-
+
SPCSSAttr *css = sp_repr_css_attr_new ();
if (true) {
if (lpeitem->style->stroke.isPaintserver()) {
@@ -107,16 +107,16 @@ void LPEJoinType::doOnApply(SPLPEItem const* lpeitem)
} else {
sp_repr_css_unset_property (css, "fill");
}
-
+
sp_repr_css_set_property(css, "stroke", "none");
-
+
sp_desktop_apply_css_recursive(item, css, true);
sp_repr_css_attr_unref (css);
- if (!was_initialized)
- {
- was_initialized = true;
- line_width.param_set_value(width);
- }
+ if (!was_initialized)
+ {
+ was_initialized = true;
+ line_width.param_set_value(width);
+ }
} else {
g_warning("LPE Join Type can only be applied to paths (not groups).");
}
@@ -126,8 +126,8 @@ void LPEJoinType::doOnApply(SPLPEItem const* lpeitem)
void LPEJoinType::doOnRemove(SPLPEItem const* lpeitem)
{
-
- if (SP_IS_SHAPE(lpeitem)) {
+
+ if (SP_IS_SHAPE(lpeitem)) {
SPLPEItem *item = const_cast<SPLPEItem*>(lpeitem);
SPCSSAttr *css = sp_repr_css_attr_new ();
@@ -152,7 +152,7 @@ void LPEJoinType::doOnRemove(SPLPEItem const* lpeitem)
sp_repr_css_unset_property (css, "stroke");
}
- Inkscape::CSSOStringStream os;
+ Inkscape::CSSOStringStream os;
os << fabs(line_width);
sp_repr_css_set_property (css, "stroke-width", os.str().c_str());
@@ -165,13 +165,13 @@ void LPEJoinType::doOnRemove(SPLPEItem const* lpeitem)
}
// NOTE: I originally had all the outliner functions defined in here, but they were actually useful
-// enough for other LPEs so I moved them all into pathoutlineprovider.cpp. The code here is just a
+// enough for other LPEs so I moved them all into pathoutlineprovider.cpp. The code here is just a
// wrapper around it.
std::vector<Geom::Path> LPEJoinType::doEffect_path(std::vector<Geom::Path> const & path_in)
-{
- return Outline::PathVectorOutline(path_in, line_width, static_cast<ButtTypeMod>(linecap_type.get_value()),
+{
+ return Outline::PathVectorOutline(path_in, line_width, static_cast<ButtTypeMod>(linecap_type.get_value()),
static_cast<LineJoinType>(linejoin_type.get_value()),
- (attempt_force_join ? std::numeric_limits<double>::max() : miter_limit),
+ (attempt_force_join ? std::numeric_limits<double>::max() : miter_limit),
start_lean/2 ,end_lean/2);
}
diff --git a/src/live_effects/lpe-jointype.h b/src/live_effects/lpe-jointype.h
index d20640b74..73705666d 100644
--- a/src/live_effects/lpe-jointype.h
+++ b/src/live_effects/lpe-jointype.h
@@ -5,10 +5,10 @@
*
* Released under GNU GPL v2, read the file COPYING for more information
*/
-
+
#ifndef INKSCAPE_LPE_JOINTYPE_H
#define INKSCAPE_LPE_JOINTYPE_H
-
+
#include "live_effects/effect.h"
#include "live_effects/parameter/parameter.h"
#include "live_effects/parameter/point.h"
@@ -16,28 +16,28 @@
namespace Inkscape {
namespace LivePathEffect {
-
+
class LPEJoinType : public Effect {
public:
- LPEJoinType(LivePathEffectObject *lpeobject);
- virtual ~LPEJoinType();
-
- virtual void doOnApply(SPLPEItem const* lpeitem);
- virtual void doOnRemove(SPLPEItem const* lpeitem);
- virtual std::vector <Geom::Path> doEffect_path (std::vector<Geom::Path> const & path_in);
+ LPEJoinType(LivePathEffectObject *lpeobject);
+ virtual ~LPEJoinType();
+
+ virtual void doOnApply(SPLPEItem const* lpeitem);
+ virtual void doOnRemove(SPLPEItem const* lpeitem);
+ virtual std::vector <Geom::Path> doEffect_path (std::vector<Geom::Path> const & path_in);
private:
- LPEJoinType(const LPEJoinType&);
- LPEJoinType& operator=(const LPEJoinType&);
-
- ScalarParam line_width;
- EnumParam<unsigned> linecap_type;
- EnumParam<unsigned> linejoin_type;
- ScalarParam start_lean;
- ScalarParam end_lean;
- ScalarParam miter_limit;
- BoolParam attempt_force_join;
- bool was_initialized;
+ LPEJoinType(const LPEJoinType&);
+ LPEJoinType& operator=(const LPEJoinType&);
+
+ ScalarParam line_width;
+ EnumParam<unsigned> linecap_type;
+ EnumParam<unsigned> linejoin_type;
+ ScalarParam start_lean;
+ ScalarParam end_lean;
+ ScalarParam miter_limit;
+ BoolParam attempt_force_join;
+ bool was_initialized;
};
} //namespace LivePathEffect
diff --git a/src/live_effects/lpe-taperstroke.cpp b/src/live_effects/lpe-taperstroke.cpp
index db7e47f2b..9c43b6671 100644
--- a/src/live_effects/lpe-taperstroke.cpp
+++ b/src/live_effects/lpe-taperstroke.cpp
@@ -211,7 +211,7 @@ Geom::PathVector LPETaperStroke::doEffect_path(Geom::PathVector const& path_in)
//if so, reset the end offset, but still allow the start offset.
if ( attach_start >= (size - attach_end) ) {
attach_end.param_set_value( size - attach_start );
- metInMiddle = true;
+ metInMiddle = true;
}
}
@@ -525,14 +525,14 @@ void LPETaperStroke::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop *de
{
{
KnotHolderEntity *e = new TpS::KnotHolderEntityAttachBegin(this);
- e->create( desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
- _("Start point of the taper"), SP_KNOT_SHAPE_CIRCLE );
+ e->create(desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
+ _("Start point of the taper"), SP_KNOT_SHAPE_CIRCLE );
knotholder->add(e);
}
{
KnotHolderEntity *e = new TpS::KnotHolderEntityAttachEnd(this);
- e->create( desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
- _("End point of the taper"), SP_KNOT_SHAPE_CIRCLE );
+ e->create(desktop, item, knotholder, Inkscape::CTRL_TYPE_UNKNOWN,
+ _("End point of the taper"), SP_KNOT_SHAPE_CIRCLE );
knotholder->add(e);
}
}
diff --git a/src/live_effects/parameter/originalpatharray.cpp b/src/live_effects/parameter/originalpatharray.cpp
index 7b0b073ee..7706dbdf8 100644
--- a/src/live_effects/parameter/originalpatharray.cpp
+++ b/src/live_effects/parameter/originalpatharray.cpp
@@ -344,7 +344,7 @@ void OriginalPathArrayParam::remove_link(PathAndDirection* to)
}
}
-void OriginalPathArrayParam::linked_delete(SPObject */*deleted*/, PathAndDirection* to)
+void OriginalPathArrayParam::linked_delete(SPObject */*deleted*/, PathAndDirection* /*to*/)
{
//remove_link(to);
@@ -383,12 +383,7 @@ void OriginalPathArrayParam::linked_changed(SPObject */*old_obj*/, SPObject *new
}
}
-void OriginalPathArrayParam::linked_transformed(Geom::Affine const *mp, SPItem* original, PathAndDirection* to)
-{
-
-}
-
-void OriginalPathArrayParam::setPathVector(SPObject *linked_obj, guint flags, PathAndDirection* to)
+void OriginalPathArrayParam::setPathVector(SPObject *linked_obj, guint /*flags*/, PathAndDirection* to)
{
if (!to) {
return;
diff --git a/src/live_effects/parameter/originalpatharray.h b/src/live_effects/parameter/originalpatharray.h
index 1c60da409..6c792613f 100644
--- a/src/live_effects/parameter/originalpatharray.h
+++ b/src/live_effects/parameter/originalpatharray.h
@@ -40,7 +40,6 @@ public:
}
gchar *href;
URIReference ref;
- //SPItem *obj;
std::vector<Geom::Path> _pathvector;
bool reversed;
@@ -83,7 +82,7 @@ protected:
void linked_changed(SPObject *old_obj, SPObject *new_obj, PathAndDirection* to);
void linked_modified(SPObject *linked_obj, guint flags, PathAndDirection* to);
- void linked_transformed(Geom::Affine const *mp, SPItem *original, PathAndDirection* to);
+ void linked_transformed(Geom::Affine const *, SPItem *, PathAndDirection*) {}
void linked_delete(SPObject *deleted, PathAndDirection* to);
ModelColumns *_model;