From a7f2b2ba3f13ceb60376802f4a31e104153839e8 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Tue, 17 Feb 2015 03:00:37 +0100 Subject: At first, I was thinking "I just have to go to the selection file, and change that GSList* with a std::list, then resolve the few problems" So, i tried that. And I will continue tomorrow, and the days after, on and on. (bzr r13922.1.1) --- src/gradient-drag.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/gradient-drag.cpp') diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp index 154b7339b..649928060 100644 --- a/src/gradient-drag.cpp +++ b/src/gradient-drag.cpp @@ -2082,9 +2082,9 @@ void GrDrag::updateDraggers() this->draggers = NULL; g_return_if_fail(this->selection != NULL); - - for (GSList const* i = this->selection->itemList(); i != NULL; i = i->next) { - SPItem *item = SP_ITEM(i->data); + SelContainer list = this->selection->itemList(); + for (SelContainer::const_iterator i=list.begin();i!=list.end();i++) { + SPItem *item = SP_ITEM(*i); SPStyle *style = item->style; if (style && (style->fill.isPaintserver())) { @@ -2151,9 +2151,9 @@ void GrDrag::updateLines() g_return_if_fail(this->selection != NULL); - for (GSList const* i = this->selection->itemList(); i != NULL; i = i->next) { - - SPItem *item = SP_ITEM(i->data); + SelContainer list = this->selection->itemList(); + for (SelContainer::const_iterator i=list.begin();i!=list.end();i++) { + SPItem *item = SP_ITEM(*i); SPStyle *style = item->style; @@ -2295,8 +2295,9 @@ void GrDrag::updateLevels() g_return_if_fail (this->selection != NULL); - for (GSList const* i = this->selection->itemList(); i != NULL; i = i->next) { - SPItem *item = SP_ITEM(i->data); + SelContainer list = this->selection->itemList(); + for (SelContainer::const_iterator i=list.begin();i!=list.end();i++) { + SPItem *item = SP_ITEM(*i); Geom::OptRect rect = item->desktopVisualBounds(); if (rect) { // Remember the edges of the bbox and the center axis -- cgit v1.2.3 From 5fd00cab14d48beaf2279a2b8f3ad5b02b76c87b Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Thu, 19 Feb 2015 04:25:21 +0100 Subject: Put a few std::vector (bzr r13922.1.5) --- src/gradient-drag.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gradient-drag.cpp') diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp index 649928060..525fc074f 100644 --- a/src/gradient-drag.cpp +++ b/src/gradient-drag.cpp @@ -2082,8 +2082,8 @@ void GrDrag::updateDraggers() this->draggers = NULL; g_return_if_fail(this->selection != NULL); - SelContainer list = this->selection->itemList(); - for (SelContainer::const_iterator i=list.begin();i!=list.end();i++) { + std::vector list = this->selection->itemList(); + for (std::vector::const_iterator i=list.begin();i!=list.end();i++) { SPItem *item = SP_ITEM(*i); SPStyle *style = item->style; @@ -2151,8 +2151,8 @@ void GrDrag::updateLines() g_return_if_fail(this->selection != NULL); - SelContainer list = this->selection->itemList(); - for (SelContainer::const_iterator i=list.begin();i!=list.end();i++) { + std::vector list = this->selection->itemList(); + for (std::vector::const_iterator i=list.begin();i!=list.end();i++) { SPItem *item = SP_ITEM(*i); SPStyle *style = item->style; @@ -2295,8 +2295,8 @@ void GrDrag::updateLevels() g_return_if_fail (this->selection != NULL); - SelContainer list = this->selection->itemList(); - for (SelContainer::const_iterator i=list.begin();i!=list.end();i++) { + std::vector list = this->selection->itemList(); + for (std::vector::const_iterator i=list.begin();i!=list.end();i++) { SPItem *item = SP_ITEM(*i); Geom::OptRect rect = item->desktopVisualBounds(); if (rect) { -- cgit v1.2.3 From 9a7fa4d1899d30ec745107823f307b2a0bf3172f Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 27 Feb 2015 03:10:36 +0100 Subject: corrected the casts (hopefully) (bzr r13922.1.10) --- src/gradient-drag.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gradient-drag.cpp') diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp index 525fc074f..5a49435d4 100644 --- a/src/gradient-drag.cpp +++ b/src/gradient-drag.cpp @@ -2083,8 +2083,8 @@ void GrDrag::updateDraggers() g_return_if_fail(this->selection != NULL); std::vector list = this->selection->itemList(); - for (std::vector::const_iterator i=list.begin();i!=list.end();i++) { - SPItem *item = SP_ITEM(*i); + for (std::vector::const_iterator i = list.begin(); i != list.end(); i++) { + SPItem *item = *i; SPStyle *style = item->style; if (style && (style->fill.isPaintserver())) { @@ -2152,8 +2152,8 @@ void GrDrag::updateLines() g_return_if_fail(this->selection != NULL); std::vector list = this->selection->itemList(); - for (std::vector::const_iterator i=list.begin();i!=list.end();i++) { - SPItem *item = SP_ITEM(*i); + for (std::vector::const_iterator i = list.begin(); i != list.end(); i++) { + SPItem *item = *i; SPStyle *style = item->style; @@ -2296,8 +2296,8 @@ void GrDrag::updateLevels() g_return_if_fail (this->selection != NULL); std::vector list = this->selection->itemList(); - for (std::vector::const_iterator i=list.begin();i!=list.end();i++) { - SPItem *item = SP_ITEM(*i); + for (std::vector::const_iterator i = list.begin(); i != list.end(); i++) { + SPItem *item = *i; Geom::OptRect rect = item->desktopVisualBounds(); if (rect) { // Remember the edges of the bbox and the center axis -- cgit v1.2.3 From 48e0423afcb02fe4a0f705d828a0dbdb3106b397 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 8 May 2015 15:46:25 +0200 Subject: fixes a few of jenkins warnings (bzr r14126) --- src/gradient-drag.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gradient-drag.cpp') diff --git a/src/gradient-drag.cpp b/src/gradient-drag.cpp index 169710114..b22714959 100644 --- a/src/gradient-drag.cpp +++ b/src/gradient-drag.cpp @@ -1155,7 +1155,7 @@ static void gr_knot_clicked_handler(SPKnot */*knot*/, guint state, gpointer data break; default: - break; + return; } -- cgit v1.2.3