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
@@ -35,7 +35,7 @@ void HierarchyWindow::Create(EditorComponent* _editor)
parentCombo.Create("Parent: ");
parentCombo.SetSize(XMFLOAT2(wid, hei));
parentCombo.SetPos(XMFLOAT2(x, y));
parentCombo.OnSelect([&](wi::gui::EventArgs args) {
parentCombo.OnSelect([this](wi::gui::EventArgs args) {
Scene& scene = editor->GetCurrentScene();
for (auto& x : editor->translator.selected)
{