Don't use by reference capture by default (#1207)
replace [&] with [this] or [] where possible to avoid people accidentally capturing something by reference that needs to be copied, like strings.
This commit is contained in:
@@ -54,7 +54,7 @@ void ComponentsWindow::Create(EditorComponent* _editor)
|
||||
filterCombo.AddItem(ICON_SPLINE, (uint64_t)Filter::Spline);
|
||||
filterCombo.SetTooltip("Apply filtering to the Entities by components");
|
||||
filterCombo.SetLocalizationEnabled(wi::gui::LocalizationEnabled::Tooltip);
|
||||
filterCombo.OnSelect([&](wi::gui::EventArgs args) {
|
||||
filterCombo.OnSelect([this](wi::gui::EventArgs args) {
|
||||
filter = (Filter)args.userdata;
|
||||
RefreshEntityTree();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user