summaryrefslogtreecommitdiffstats
path: root/src/xml/rebase-hrefs.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/xml/rebase-hrefs.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/xml/rebase-hrefs.cpp')
-rw-r--r--src/xml/rebase-hrefs.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/xml/rebase-hrefs.cpp b/src/xml/rebase-hrefs.cpp
index 9d4f4f9fc..2bcae5d81 100644
--- a/src/xml/rebase-hrefs.cpp
+++ b/src/xml/rebase-hrefs.cpp
@@ -220,9 +220,9 @@ void Inkscape::XML::rebase_hrefs(SPDocument *const doc, gchar const *const new_b
*
* Note also that Inkscape only supports fragment hrefs (href="#pattern257") for many of these
* cases. */
- GSList const *images = doc->getResourceList("image");
- for (GSList const *l = images; l != NULL; l = l->next) {
- Inkscape::XML::Node *ir = static_cast<SPObject *>(l->data)->getRepr();
+ std::set<SPObject *> images = doc->getResourceList("image");
+ for (std::set<SPObject *>::const_iterator it = images.begin(); it != images.end(); ++it) {
+ Inkscape::XML::Node *ir = (*it)->getRepr();
std::string uri;
{