summaryrefslogtreecommitdiffstats
path: root/src/widgets/gradient-vector.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2015-12-07 23:34:32 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2015-12-07 23:34:32 +0000
commit93650897c928bfa9ca9b737cfbff55c25271d5d3 (patch)
tree140edc7a4fdb7f1bc5944842a154681964243494 /src/widgets/gradient-vector.cpp
parentupdate to trunk (no conflict) (diff)
downloadinkscape-93650897c928bfa9ca9b737cfbff55c25271d5d3.tar.gz
inkscape-93650897c928bfa9ca9b737cfbff55c25271d5d3.zip
cppification : GHashMaps replaced by stl maps. getResouceList now gives a std::set<SPObject *>.
Should give some performance improvements (quite a few linear lookups are now logarithmic) (bzr r14504.1.6)
Diffstat (limited to 'src/widgets/gradient-vector.cpp')
-rw-r--r--src/widgets/gradient-vector.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/gradient-vector.cpp b/src/widgets/gradient-vector.cpp
index 8e92f589a..35c1e4a8d 100644
--- a/src/widgets/gradient-vector.cpp
+++ b/src/widgets/gradient-vector.cpp
@@ -298,11 +298,11 @@ static void sp_gvs_rebuild_gui_full(SPGradientVectorSelector *gvs)
/* Pick up all gradients with vectors */
GSList *gl = NULL;
if (gvs->gr) {
- const GSList *gradients = gvs->gr->document->getResourceList("gradient");
- for (const GSList *curr = gradients; curr; curr = curr->next) {
- SPGradient* grad = SP_GRADIENT(curr->data);
+ std::set<SPObject *> gradients = gvs->gr->document->getResourceList("gradient");
+ for (std::set<SPObject *>::const_iterator it = gradients.begin(); it != gradients.end(); ++it) {
+ SPGradient* grad = SP_GRADIENT(*it);
if ( grad->hasStops() && (grad->isSwatch() == gvs->swatched) ) {
- gl = g_slist_prepend(gl, curr->data);
+ gl = g_slist_prepend(gl, *it);
}
}
}