summaryrefslogtreecommitdiffstats
path: root/src/ui/tool
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2017-10-01 15:49:26 +0000
committerMarc Jeanmougin <marc@jeanmougin.fr>2017-10-01 15:49:26 +0000
commite0957537cd0938313803c290a2f3922a3889e6f1 (patch)
tree7f158d00a7655ee91ac094f676f6b3bd624a78b7 /src/ui/tool
parentMerge branch 'master' of gitlab.com:inkscape/inkscape (diff)
downloadinkscape-e0957537cd0938313803c290a2f3922a3889e6f1.tar.gz
inkscape-e0957537cd0938313803c290a2f3922a3889e6f1.zip
Removed all GSList occurences in .h files
Diffstat (limited to 'src/ui/tool')
-rw-r--r--src/ui/tool/manipulator.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ui/tool/manipulator.h b/src/ui/tool/manipulator.h
index 07e01a656..0f26c6de1 100644
--- a/src/ui/tool/manipulator.h
+++ b/src/ui/tool/manipulator.h
@@ -98,16 +98,17 @@ public:
bool empty() {
return _mmap.empty();
}
- void setItems(GSList const *list) {
+
+ void setItems(std::vector<gpointer> list) { // this function is not called anywhere ... delete ?
std::set<void*> to_remove;
for (typename MapType::iterator mi = _mmap.begin(); mi != _mmap.end(); ++mi) {
to_remove.insert(mi->first);
}
- for (GSList *i = const_cast<GSList*>(list); i; i = i->next) {
- if (_isItemType(i->data)) {
+ for (auto i:list) {
+ if (_isItemType(i)) {
// erase returns the number of items removed
// if nothing was removed, it means this item did not have a manipulator - add it
- if (!to_remove.erase(i->data)) addItem(i->data);
+ if (!to_remove.erase(i)) addItem(i);
}
}
typedef typename std::set<void*>::iterator RmIter;