C++11: replace deprecated function std::bind2nd with lambda functions

This commit is contained in:
wmayer
2020-10-15 14:46:02 +02:00
parent d8bbced84e
commit 56c6db10e0
11 changed files with 59 additions and 40 deletions

View File

@@ -168,9 +168,8 @@ void DlgDisplayPropertiesImp::slotChangedObject(const Gui::ViewProvider& obj,
// We pick out all the properties for which we need to update this dialog.
std::vector<Gui::ViewProvider*> Provider = getSelection();
std::vector<Gui::ViewProvider*>::const_iterator vp = std::find_if
(Provider.begin(), Provider.end(),
std::bind2nd(std::equal_to<Gui::ViewProvider*>(),
const_cast<Gui::ViewProvider*>(&obj)));
(Provider.begin(), Provider.end(), [&obj](Gui::ViewProvider* v) { return v == &obj; });
if (vp != Provider.end()) {
const char* name = obj.getPropertyName(&prop);
// this is not a property of the view provider but of the document object