diff options
| author | Marc Jeanmougin <marc@jeanmougin.fr> | 2015-12-07 23:34:32 +0000 |
|---|---|---|
| committer | Marc Jeanmougin <marcjeanmougin@free.fr> | 2015-12-07 23:34:32 +0000 |
| commit | 93650897c928bfa9ca9b737cfbff55c25271d5d3 (patch) | |
| tree | 140edc7a4fdb7f1bc5944842a154681964243494 /src/profile-manager.cpp | |
| parent | update to trunk (no conflict) (diff) | |
| download | inkscape-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/profile-manager.cpp')
| -rw-r--r-- | src/profile-manager.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/profile-manager.cpp b/src/profile-manager.cpp index 90b124195..035aa6051 100644 --- a/src/profile-manager.cpp +++ b/src/profile-manager.cpp @@ -34,11 +34,9 @@ void ProfileManager::_resourcesChanged() { std::vector<SPObject*> newList; if (_doc) { - const GSList *current = _doc->getResourceList( "iccprofile" ); - while ( current ) { - newList.push_back(SP_OBJECT(current->data)); - current = g_slist_next(current); - } + std::set<SPObject *> current = _doc->getResourceList( "iccprofile" ); + for (std::set<SPObject *>::const_iterator i = current.begin(); i != current.end(); ++i) + newList.push_back(*i); } sort( newList.begin(), newList.end() ); |
