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:
Dennis Brakhane
2025-08-13 08:46:42 +02:00
committed by GitHub
parent 22674314ac
commit f0bd5a8086
23 changed files with 195 additions and 195 deletions
+1 -1
View File
@@ -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();
});