Remove std::bind usages from Code/Editor (#3358)

A few small modernizations as well ( override )

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
This commit is contained in:
Artur K
2021-08-20 18:49:19 +02:00
committed by GitHub
parent 30e46cc377
commit 992f87b03d
9 changed files with 39 additions and 36 deletions
@@ -145,7 +145,7 @@ bool UserPopupWidgetHandler::ReadValuesIntoGUI(size_t index, UserPropertyEditor*
QWidget* FloatCurveHandler::CreateGUI(QWidget *pParent)
{
CSplineCtrl *cSpline = new CSplineCtrl(pParent);
cSpline->SetUpdateCallback(AZStd::bind(&FloatCurveHandler::OnSplineChange, this, AZStd::placeholders::_1));
cSpline->SetUpdateCallback([this](CSplineCtrl* spl) { OnSplineChange(spl); });
cSpline->SetTimeRange(0, 1);
cSpline->SetValueRange(0, 1);
cSpline->SetGrid(12, 12);
@@ -172,8 +172,8 @@ ReflectedPropertyItem::ReflectedPropertyItem(ReflectedPropertyControl *control,
if (parent)
parent->AddChild(this);
m_onSetCallback = AZStd::bind(&ReflectedPropertyItem::OnVariableChange, this, AZStd::placeholders::_1);
m_onSetEnumCallback = AZStd::bind(&ReflectedPropertyItem::OnVariableEnumChange, this, AZStd::placeholders::_1);
m_onSetCallback = [this](IVariable* var) { OnVariableChange(var); };
m_onSetEnumCallback = [this](IVariable* var) { OnVariableEnumChange(var); };
}
ReflectedPropertyItem::~ReflectedPropertyItem()