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
@@ -146,7 +146,7 @@ void EmitterWindow::Create(EditorComponent* _editor)
debugCheckBox.Create("DEBUG: ");
debugCheckBox.SetPos(XMFLOAT2(x, y += step));
debugCheckBox.SetSize(XMFLOAT2(itemheight, itemheight));
debugCheckBox.OnClick([&](wi::gui::EventArgs args) {
debugCheckBox.OnClick([](wi::gui::EventArgs args) {
wi::renderer::SetToDrawDebugEmitters(args.bValue);
});
debugCheckBox.SetCheck(wi::renderer::GetToDrawDebugEmitters());