From 57808dd1abe86ae0088a74bd88041321f5df5fb8 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Fri, 8 May 2015 00:45:15 +0200 Subject: fix for stl "remove" (bzr r14123) --- src/path-chemistry.cpp | 4 ++-- src/selection-chemistry.cpp | 8 ++++---- src/ui/tools/eraser-tool.cpp | 2 +- 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 &items, std::vector& 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 &items, std::vector& 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(i->data)->getRepr()); - remove(items_to_select.begin(),items_to_select.end(),static_cast(i->data)); + items_to_select.erase(remove(items_to_select.begin(), items_to_select.end(), static_cast(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(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(static_cast(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 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; -- cgit v1.2.3