summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKris De Gussem <kris.degussem@gmail.com>2013-03-13 17:30:15 +0000
committerKris <Kris.De.Gussem@hotmail.com>2013-03-13 17:30:15 +0000
commit816331ffe13fafc75693c455ca7018fa841fcfab (patch)
treee76e6f7ab0fe789fc0fc715a83c963029af2c928 /src
parentGTK3: fix layout of 'Fill and Stroke' tabs (see bug #1088264) (diff)
downloadinkscape-816331ffe13fafc75693c455ca7018fa841fcfab.tar.gz
inkscape-816331ffe13fafc75693c455ca7018fa841fcfab.zip
cppcheck
(bzr r12201)
Diffstat (limited to 'src')
-rw-r--r--src/io/inkjar.cpp2
-rw-r--r--src/live_effects/lpe-angle_bisector.cpp2
-rw-r--r--src/live_effects/lpe-dynastroke.cpp2
-rw-r--r--src/live_effects/lpe-extrude.cpp4
-rw-r--r--src/live_effects/lpe-recursiveskeleton.cpp5
-rw-r--r--src/live_effects/lpe-ruler.cpp9
6 files changed, 9 insertions, 15 deletions
diff --git a/src/io/inkjar.cpp b/src/io/inkjar.cpp
index 20b164b99..4af140737 100644
--- a/src/io/inkjar.cpp
+++ b/src/io/inkjar.cpp
@@ -311,7 +311,7 @@ guint8 *JarFile::get_uncompressed_file(guint32 compressed_size, guint32 crc,
in_a -= nbytes;
#ifdef DEBUG
- std::printf("%d bytes written\n", out_a);
+ std::printf("%u bytes written\n", out_a);
#endif
}
lseek(fd, eflen, SEEK_CUR);
diff --git a/src/live_effects/lpe-angle_bisector.cpp b/src/live_effects/lpe-angle_bisector.cpp
index 91f779ef3..2f57b710b 100644
--- a/src/live_effects/lpe-angle_bisector.cpp
+++ b/src/live_effects/lpe-angle_bisector.cpp
@@ -61,8 +61,6 @@ LPEAngleBisector::doEffect_path (std::vector<Geom::Path> const & path_in)
{
using namespace Geom;
- std::vector<Geom::Path> path_out;
-
// we assume that the path has >= 3 nodes
ptA = path_in[0].pointAt(1);
Point B = path_in[0].initialPoint();
diff --git a/src/live_effects/lpe-dynastroke.cpp b/src/live_effects/lpe-dynastroke.cpp
index 467fdfd9c..a5295d269 100644
--- a/src/live_effects/lpe-dynastroke.cpp
+++ b/src/live_effects/lpe-dynastroke.cpp
@@ -152,7 +152,7 @@ LPEDynastroke::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p
double angle_rad = angle*M_PI/180.;//TODO: revert orientation?...
Piecewise<SBasis> w;
- std::vector<double> corners = find_corners(m);
+ // std::vector<double> corners = find_corners(m);
DynastrokeMethod stroke_method = method.get_value();
if (roundness==1.) {
diff --git a/src/live_effects/lpe-extrude.cpp b/src/live_effects/lpe-extrude.cpp
index 7f5a00cf8..8b3f4714a 100644
--- a/src/live_effects/lpe-extrude.cpp
+++ b/src/live_effects/lpe-extrude.cpp
@@ -124,9 +124,9 @@ LPEExtrude::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2
}
std::vector<double> connector_pts;
- if (rts.size() < 1) {
+ if (rts.empty()) {
connector_pts = cusps;
- } else if (cusps.size() < 1) {
+ } else if (cusps.empty()) {
connector_pts = rts;
} else {
connector_pts = rts;
diff --git a/src/live_effects/lpe-recursiveskeleton.cpp b/src/live_effects/lpe-recursiveskeleton.cpp
index 906c430c1..452139344 100644
--- a/src/live_effects/lpe-recursiveskeleton.cpp
+++ b/src/live_effects/lpe-recursiveskeleton.cpp
@@ -49,8 +49,6 @@ LPERecursiveSkeleton::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > co
using namespace Geom;
Piecewise<D2<SBasis> > output;
- std::vector<Piecewise<D2<SBasis> > > pre_output;
-
double prop_scale = 1.0;
D2<Piecewise<SBasis> > patternd2 = make_cuts_independent(pwd2_in);
@@ -90,8 +88,7 @@ LPERecursiveSkeleton::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > co
Piecewise<D2<SBasis> > n = rot90(derivative(uskeleton));
n = force_continuity(remove_short_cuts(n,.1));
- double scaling = 1;
- scaling = (uskeleton.domain().extent() - toffset)/pattBndsX->extent();
+ double scaling = (uskeleton.domain().extent() - toffset)/pattBndsX->extent();
// TODO investigate why pattWidth is not being used:
double pattWidth = pattBndsX->extent() * scaling;
diff --git a/src/live_effects/lpe-ruler.cpp b/src/live_effects/lpe-ruler.cpp
index 88743548b..fefdad95a 100644
--- a/src/live_effects/lpe-ruler.cpp
+++ b/src/live_effects/lpe-ruler.cpp
@@ -80,11 +80,10 @@ LPERuler::ruler_mark(Geom::Point const &A, Geom::Point const &n, MarkType const
{
using namespace Geom;
- gboolean success;
double real_mark_length = mark_length;
- success = sp_convert_distance(&real_mark_length, unit, &sp_unit_get_by_id(SP_UNIT_PX));
+ sp_convert_distance(&real_mark_length, unit, &sp_unit_get_by_id(SP_UNIT_PX));
double real_minor_mark_length = minor_mark_length;
- success = sp_convert_distance(&real_minor_mark_length, unit, &sp_unit_get_by_id(SP_UNIT_PX));
+ sp_convert_distance(&real_minor_mark_length, unit, &sp_unit_get_by_id(SP_UNIT_PX));
n_major = real_mark_length * n;
n_minor = real_minor_mark_length * n;
@@ -134,10 +133,10 @@ LPERuler::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_i
std::vector<double> s_cuts;
double real_mark_distance = mark_distance;
- gboolean success = sp_convert_distance(&real_mark_distance, unit, &sp_unit_get_by_id(SP_UNIT_PX));
+ sp_convert_distance(&real_mark_distance, unit, &sp_unit_get_by_id(SP_UNIT_PX));
double real_offset = offset;
- success = sp_convert_distance(&real_offset, unit, &sp_unit_get_by_id(SP_UNIT_PX));
+ sp_convert_distance(&real_offset, unit, &sp_unit_get_by_id(SP_UNIT_PX));
for (double s = real_offset; s<totlength; s+=real_mark_distance){
s_cuts.push_back(s);
}