modernize C++: avoid bind

In many cases std::bind() is kept because the code is much simpler
This commit is contained in:
wmayer
2023-08-08 19:10:49 +02:00
committed by wwmayer
parent 292196a606
commit d150fa7164
80 changed files with 240 additions and 30 deletions

View File

@@ -181,12 +181,16 @@ void PropertyExpressionEngine::hasSetValue()
std::string key = objName + propName;
auto &propDeps = pimpl->propMap[key];
if(propDeps.empty()) {
if(!propName.empty())
//NOLINTBEGIN
if(!propName.empty()) {
pimpl->conns.emplace_back(obj->signalChanged.connect(std::bind(
&PropertyExpressionEngine::slotChangedProperty,this,sp::_1,sp::_2)));
else
}
else {
pimpl->conns.emplace_back(obj->signalChanged.connect(std::bind(
&PropertyExpressionEngine::slotChangedObject,this,sp::_1,sp::_2)));
}
//NOLINTEND
}
propDeps.push_back(e.first);
}