summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2015-05-07 22:45:15 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2015-05-07 22:45:15 +0000
commit57808dd1abe86ae0088a74bd88041321f5df5fb8 (patch)
tree51510fffb8f7cc7453d49a56b9e272fdb1d567ab /src
parentbetter fix, using std::remove instead of std::erase (diff)
downloadinkscape-57808dd1abe86ae0088a74bd88041321f5df5fb8.tar.gz
inkscape-57808dd1abe86ae0088a74bd88041321f5df5fb8.zip
fix for stl "remove"
(bzr r14123)
Diffstat (limited to 'src')
-rw-r--r--src/path-chemistry.cpp4
-rw-r--r--src/selection-chemistry.cpp8
-rw-r--r--src/ui/tools/eraser-tool.cpp2
3 files changed, 7 insertions, 7 deletions
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index ff307cd66..7bd5b6298 100644
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
@@ -388,7 +388,7 @@ sp_item_list_to_curves(const std::vector<SPItem*> &items, std::vector<SPItem*>&
if (repr) {
to_select.insert(to_select.begin(),repr);
did = true;
- remove(selected.begin(),selected.end(),item);
+ selected.erase(remove(selected.begin(), selected.end(), item), selected.end());
}
continue;
@@ -413,7 +413,7 @@ sp_item_list_to_curves(const std::vector<SPItem*> &items, std::vector<SPItem*>&
continue;
did = true;
- remove(selected.begin(),selected.end(),item);
+ selected.erase(remove(selected.begin(), selected.end(), item), selected.end());
// remember the position of the item
gint pos = item->getRepr()->position();
diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp
index 1e3afc6a8..2cd4f6b4e 100644
--- a/src/selection-chemistry.cpp
+++ b/src/selection-chemistry.cpp
@@ -3922,7 +3922,7 @@ void sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_
for (GSList *i = apply_to_items ; NULL != i ; i = i->next) {
reprs_to_group.push_back(static_cast<SPObject*>(i->data)->getRepr());
- remove(items_to_select.begin(),items_to_select.end(),static_cast<SPObject*>(i->data));
+ items_to_select.erase(remove(items_to_select.begin(), items_to_select.end(), static_cast<SPObject*>(i->data)), items_to_select.end());
}
sp_selection_group_impl(reprs_to_group, group, xml_doc, doc);
@@ -3972,7 +3972,7 @@ void sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_
Inkscape::XML::Node *spnew = current->duplicate(xml_doc);
gint position = current->position();
- remove(items_to_select.begin(),items_to_select.end(),item);
+ items_to_select.erase(remove(items_to_select.begin(), items_to_select.end(), item), items_to_select.end());
current->parent()->appendChild(group);
sp_repr_unparent(current);
group->appendChild(spnew);
@@ -3996,7 +3996,7 @@ void sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_
for (GSList *i = items_to_delete; NULL != i; i = i->next) {
SPObject *item = reinterpret_cast<SPObject*>(i->data);
item->deleteObject(false);
- remove(items_to_select.begin(),items_to_select.end(),item);
+ items_to_select.erase(remove(items_to_select.begin(), items_to_select.end(), item), items_to_select.end());
}
g_slist_free(items_to_delete);
@@ -4121,7 +4121,7 @@ void sp_selection_unset_mask(SPDesktop *desktop, bool apply_clip_path) {
for (GSList *i = items_to_ungroup ; NULL != i ; i = i->next) {
SPGroup *group = dynamic_cast<SPGroup *>(static_cast<SPObject *>(i->data));
if (group) {
- remove(items_to_select.begin(),items_to_select.end(),group);
+ items_to_select.erase(remove(items_to_select.begin(), items_to_select.end(), group), items_to_select.end());
std::vector<SPItem*> children;
sp_item_group_ungroup(group, children, false);
items_to_select.insert(items_to_select.end(),children.rbegin(),children.rend());
diff --git a/src/ui/tools/eraser-tool.cpp b/src/ui/tools/eraser-tool.cpp
index 8a9db6c72..10f8c8694 100644
--- a/src/ui/tools/eraser-tool.cpp
+++ b/src/ui/tools/eraser-tool.cpp
@@ -674,7 +674,7 @@ void EraserTool::set_to_accumulated() {
Inkscape::Rubberband *r = Inkscape::Rubberband::get(desktop);
toWorkOn = desktop->getDocument()->getItemsAtPoints(desktop->dkey, r->getPoints());
}
- std::remove(toWorkOn.begin(),toWorkOn.end(),acid);
+ toWorkOn.erase(std::remove(toWorkOn.begin(), toWorkOn.end(), acid), toWorkOn.end());
} else {
toWorkOn= selection->itemList();
wasSelection = true;