summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter
diff options
context:
space:
mode:
authorsu_v <suv-sf@users.sourceforge.net>2015-11-15 08:31:53 +0000
committer~suv <suv-sf@users.sourceforge.net>2015-11-15 08:31:53 +0000
commitac8b388ada4e781b29570276ed9f95fd6f4dafff (patch)
tree268308a8a304debb7cf2f84e1255d5633dee5eef /src/live_effects/parameter
parentExtensions. Fix view center for Render extensions applied in transformed laye... (diff)
parentTranslations. Italian translation update. (diff)
downloadinkscape-ac8b388ada4e781b29570276ed9f95fd6f4dafff.tar.gz
inkscape-ac8b388ada4e781b29570276ed9f95fd6f4dafff.zip
merge from trunk (r14473)
(bzr r14425.1.3)
Diffstat (limited to 'src/live_effects/parameter')
-rw-r--r--src/live_effects/parameter/filletchamferpointarray.cpp10
-rw-r--r--src/live_effects/parameter/originalpatharray.cpp10
2 files changed, 9 insertions, 11 deletions
diff --git a/src/live_effects/parameter/filletchamferpointarray.cpp b/src/live_effects/parameter/filletchamferpointarray.cpp
index b089213fd..399307502 100644
--- a/src/live_effects/parameter/filletchamferpointarray.cpp
+++ b/src/live_effects/parameter/filletchamferpointarray.cpp
@@ -159,9 +159,8 @@ void FilletChamferPointArrayParam::recalculate_controlpoints_for_new_pwd2(
//todo: if the path remove some nodes whith the result of a straight
//line but with handles, the node inserted into dont fire the knot
// because is not handle as cusp node by get_nodetype function
- bool this_is_line = true;
bool next_is_line = is_straight_curve(*curve_it1);
- this_is_line = is_straight_curve((*path_it)[counterCurves - 1]);
+ bool this_is_line = is_straight_curve((*path_it)[counterCurves - 1]);
nodetype = get_nodetype((*path_it)[counterCurves - 1], *curve_it1);
if (this_is_line || next_is_line) {
nodetype = NODE_CUSP;
@@ -307,9 +306,8 @@ void FilletChamferPointArrayParam::recalculate_knots(
nodetype = NODE_NONE;
}
} else {
- bool this_is_line = true;
bool next_is_line = is_straight_curve(*curve_it1);
- this_is_line = is_straight_curve((*path_it)[counterCurves - 1]);
+ bool this_is_line = is_straight_curve((*path_it)[counterCurves - 1]);
nodetype = get_nodetype((*path_it)[counterCurves - 1], *curve_it1);
if (this_is_line || next_is_line) {
nodetype = NODE_CUSP;
@@ -467,12 +465,12 @@ double FilletChamferPointArrayParam::len_to_rad(int index, double len)
Geom::Point endArcPoint = B->toSBasis().valueAt(times[2]);
Curve *knotCurve1 = A->portion(times[0], times[1]);
Curve *knotCurve2 = B->portion(times[2], 1);
- Geom::CubicBezier const *cubic1 = dynamic_cast<Geom::CubicBezier const *>(&*knotCurve1);
+ Geom::CubicBezier const *cubic1 = dynamic_cast<Geom::CubicBezier const *>(knotCurve1);
Ray ray1(startArcPoint, A->finalPoint());
if (cubic1) {
ray1.setPoints((*cubic1)[2], startArcPoint);
}
- Geom::CubicBezier const *cubic2 = dynamic_cast<Geom::CubicBezier const *>(&*knotCurve2);
+ Geom::CubicBezier const *cubic2 = dynamic_cast<Geom::CubicBezier const *>(knotCurve2);
Ray ray2(B->initialPoint(), endArcPoint);
if (cubic2) {
ray2.setPoints(endArcPoint, (*cubic2)[1]);
diff --git a/src/live_effects/parameter/originalpatharray.cpp b/src/live_effects/parameter/originalpatharray.cpp
index 78e061e66..9e03e2c02 100644
--- a/src/live_effects/parameter/originalpatharray.cpp
+++ b/src/live_effects/parameter/originalpatharray.cpp
@@ -215,7 +215,7 @@ void OriginalPathArrayParam::on_up_button_click()
int i = -1;
std::vector<PathAndDirection*>::iterator piter = _vector.begin();
- for (std::vector<PathAndDirection*>::iterator iter = _vector.begin(); iter != _vector.end(); piter = iter, i++, iter++) {
+ for (std::vector<PathAndDirection*>::iterator iter = _vector.begin(); iter != _vector.end(); piter = iter, i++, ++iter) {
if (*iter == row[_model->_colObject]) {
_vector.erase(iter);
_vector.insert(piter, row[_model->_colObject]);
@@ -241,7 +241,7 @@ void OriginalPathArrayParam::on_down_button_click()
Gtk::TreeModel::Row row = *iter;
int i = 0;
- for (std::vector<PathAndDirection*>::iterator iter = _vector.begin(); iter != _vector.end(); i++, iter++) {
+ for (std::vector<PathAndDirection*>::iterator iter = _vector.begin(); iter != _vector.end(); i++, ++iter) {
if (*iter == row[_model->_colObject]) {
std::vector<PathAndDirection*>::iterator niter = _vector.erase(iter);
if (niter != _vector.end()) {
@@ -295,7 +295,7 @@ OriginalPathArrayParam::on_link_button_click()
Inkscape::SVGOStringStream os;
bool foundOne = false;
- for (std::vector<PathAndDirection*>::const_iterator iter = _vector.begin(); iter != _vector.end(); iter++) {
+ for (std::vector<PathAndDirection*>::const_iterator iter = _vector.begin(); iter != _vector.end(); ++iter) {
if (foundOne) {
os << "|";
} else {
@@ -330,7 +330,7 @@ void OriginalPathArrayParam::unlink(PathAndDirection* to)
void OriginalPathArrayParam::remove_link(PathAndDirection* to)
{
unlink(to);
- for (std::vector<PathAndDirection*>::iterator iter = _vector.begin(); iter != _vector.end(); iter++) {
+ for (std::vector<PathAndDirection*>::iterator iter = _vector.begin(); iter != _vector.end(); ++iter) {
if (*iter == to) {
PathAndDirection *w = *iter;
_vector.erase(iter);
@@ -455,7 +455,7 @@ gchar * OriginalPathArrayParam::param_getSVGValue() const
{
Inkscape::SVGOStringStream os;
bool foundOne = false;
- for (std::vector<PathAndDirection*>::const_iterator iter = _vector.begin(); iter != _vector.end(); iter++) {
+ for (std::vector<PathAndDirection*>::const_iterator iter = _vector.begin(); iter != _vector.end(); ++iter) {
if (foundOne) {
os << "|";
} else {