summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/live_effects/lpe-knot.cpp4
-rw-r--r--src/live_effects/lpe-powerstroke.cpp2
-rw-r--r--src/live_effects/lpe-rough-hatches.cpp2
-rw-r--r--src/live_effects/lpe-sketch.cpp2
-rw-r--r--src/live_effects/lpe-vonkoch.cpp6
-rw-r--r--src/trace/siox.cpp6
6 files changed, 11 insertions, 11 deletions
diff --git a/src/live_effects/lpe-knot.cpp b/src/live_effects/lpe-knot.cpp
index c957c8f08..9decdea9b 100644
--- a/src/live_effects/lpe-knot.cpp
+++ b/src/live_effects/lpe-knot.cpp
@@ -125,7 +125,7 @@ findShadowedTime(Geom::Path const &patha, std::vector<Geom::Point> const &pt_and
double tmin = 0, tmax = size_nondegenerate(patha);
double period = size_nondegenerate(patha);
- if (times.size()>0){
+ if (!times.empty()){
unsigned rk = upper_bound( times.begin(), times.end(), ta ) - times.begin();
if ( rk < times.size() )
tmax = times[rk];
@@ -465,7 +465,7 @@ LPEKnot::doEffect_path (std::vector<Geom::Path> const &path_in)
}
//If the all component is hidden, continue.
- if ( dom.size() == 0){
+ if (dom.empty()){
continue;
}
diff --git a/src/live_effects/lpe-powerstroke.cpp b/src/live_effects/lpe-powerstroke.cpp
index d9806b4d7..74a594a4b 100644
--- a/src/live_effects/lpe-powerstroke.cpp
+++ b/src/live_effects/lpe-powerstroke.cpp
@@ -367,7 +367,7 @@ std::vector<discontinuity_data> find_discontinuities( Geom::Piecewise<Geom::D2<G
data.der1 = der[i].at0();
double t = der.cuts[i];
std::vector< double > rts = roots (x - t); /// @todo this has multiple solutions for general strokewidth paths (generated by spiro interpolator...), ignore for now
- if (rts.size() > 0) {
+ if (!rts.empty()) {
data.width = y(rts.front());
} else {
data.width = 1;
diff --git a/src/live_effects/lpe-rough-hatches.cpp b/src/live_effects/lpe-rough-hatches.cpp
index 8324271ed..50f50d0ae 100644
--- a/src/live_effects/lpe-rough-hatches.cpp
+++ b/src/live_effects/lpe-rough-hatches.cpp
@@ -330,7 +330,7 @@ LPERoughHatches::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const &
std::vector<std::vector<Point> > snakePoints;
snakePoints = linearSnake(transformed_pwd2_in, transformed_org);
- if ( snakePoints.size() > 0 ){
+ if (!snakePoints.empty()){
Piecewise<D2<SBasis> >smthSnake = smoothSnake(snakePoints);
smthSnake = smthSnake*mat.inverse();
if (do_bend.get_value()){
diff --git a/src/live_effects/lpe-sketch.cpp b/src/live_effects/lpe-sketch.cpp
index 9cd6f1b57..e39b82f20 100644
--- a/src/live_effects/lpe-sketch.cpp
+++ b/src/live_effects/lpe-sketch.cpp
@@ -272,7 +272,7 @@ LPESketch::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_
}
}
times = roots(piecelength-s1);
- if (times.size()==0) break;//we should not be there.
+ if (times.empty()) break;//we should not be there.
t1 = times[0];
//pick a rdm perturbation, and collect the perturbed piece into output.
diff --git a/src/live_effects/lpe-vonkoch.cpp b/src/live_effects/lpe-vonkoch.cpp
index 56e73e3a3..953c2d443 100644
--- a/src/live_effects/lpe-vonkoch.cpp
+++ b/src/live_effects/lpe-vonkoch.cpp
@@ -83,7 +83,7 @@ LPEVonKoch::doEffect_path (std::vector<Geom::Path> const & path_in)
std::vector<Geom::Path> generating_path = generator.get_pathvector();
- if (generating_path.size()==0) {
+ if (generating_path.empty()) {
return path_in;
}
@@ -124,7 +124,7 @@ LPEVonKoch::doEffect_path (std::vector<Geom::Path> const & path_in)
}
}
- if (transforms.size()==0){
+ if (transforms.empty()){
return path_in;
}
@@ -247,7 +247,7 @@ LPEVonKoch::doBeforeEffect (SPLPEItem *lpeitem)
std::vector<Geom::Path> paths = ref_path.get_pathvector();
Geom::Point A,B;
- if (paths.size()==0||paths.front().size()==0){
+ if (paths.empty()||paths.front().size()==0){
//FIXME: a path is used as ref instead of 2 points to work around path/point param incompatibility bug.
//refA.param_setValue( Geom::Point(boundingbox_X.min(), boundingbox_Y.middle()) );
//refB.param_setValue( Geom::Point(boundingbox_X.max(), boundingbox_Y.middle()) );
diff --git a/src/trace/siox.cpp b/src/trace/siox.cpp
index a30d903cd..e7ef5b0c0 100644
--- a/src/trace/siox.cpp
+++ b/src/trace/siox.cpp
@@ -1011,7 +1011,7 @@ SioxImage Siox::extractForeground(const SioxImage &originalImage,
}
tupel.minFgDist = minFg;
tupel.indexMinFg = minIndex;
- if (fgSignature.size() == 0)
+ if (fgSignature.empty())
{
isBackground = (minBg <= clusterSize);
// remove next line to force behaviour of old algorithm
@@ -1414,7 +1414,7 @@ int Siox::depthFirstSearch(int startPos,
}
- while (pixelsToVisit.size() > 0)
+ while (!pixelsToVisit.empty())
{
int pos = pixelsToVisit[pixelsToVisit.size() - 1];
pixelsToVisit.erase(pixelsToVisit.end() - 1);
@@ -1486,7 +1486,7 @@ void Siox::fillColorRegions()
// int componentSize = 1;
pixelsToVisit.push_back(i);
// depth first search to fill region
- while (pixelsToVisit.size() > 0)
+ while (!pixelsToVisit.empty())
{
int pos = pixelsToVisit[pixelsToVisit.size() - 1];
pixelsToVisit.erase(pixelsToVisit.end() - 1);