diff --git a/src/gui/console/ConsoleController.cpp b/src/gui/console/ConsoleController.cpp index 4f8bd2233..0a31c798f 100644 --- a/src/gui/console/ConsoleController.cpp +++ b/src/gui/console/ConsoleController.cpp @@ -7,7 +7,7 @@ #include "lua/CommandInterface.h" -ConsoleController::ConsoleController(std::function onDone, CommandInterface * commandInterface): +ConsoleController::ConsoleController(std::function onDone_, CommandInterface * commandInterface): HasDone(false) { consoleModel = new ConsoleModel(); @@ -15,7 +15,7 @@ ConsoleController::ConsoleController(std::function onDone, CommandInter consoleView->AttachController(this); consoleModel->AddObserver(consoleView); - this->onDone = onDone; + onDone = onDone_; this->commandInterface = commandInterface; } diff --git a/src/gui/search/SearchController.cpp b/src/gui/search/SearchController.cpp index 03883d508..03cc0f29e 100644 --- a/src/gui/search/SearchController.cpp +++ b/src/gui/search/SearchController.cpp @@ -34,7 +34,7 @@ SearchController::SearchController(std::function onDone_): searchModel->UpdateSaveList(1, ""); - onDone = onDone; + onDone = onDone_; } SaveInfo * SearchController::GetLoadedSave() diff --git a/src/gui/search/SearchView.cpp b/src/gui/search/SearchView.cpp index 30ab0bb63..48285f082 100644 --- a/src/gui/search/SearchView.cpp +++ b/src/gui/search/SearchView.cpp @@ -438,7 +438,7 @@ void SearchView::NotifyTagListChanged(SearchModel * sender) ui::Point(tagWidth, tagHeight), tag.first.FromUtf8() ); - tagButton->SetActionCallback({ [this, &tag] { + tagButton->SetActionCallback({ [this, tag] { Search(tag.first.FromUtf8()); } }); tagButton->Appearance.BorderInactive = ui::Colour(0, 0, 0); diff --git a/src/gui/tags/TagsView.cpp b/src/gui/tags/TagsView.cpp index 21da4d88d..d613b4e91 100644 --- a/src/gui/tags/TagsView.cpp +++ b/src/gui/tags/TagsView.cpp @@ -83,7 +83,7 @@ void TagsView::NotifyTagsChanged(TagsModel * sender) tempButton->Appearance.Margin.Top += 2; tempButton->Appearance.HorizontalAlign = ui::Appearance::AlignCentre; tempButton->Appearance.VerticalAlign = ui::Appearance::AlignMiddle; - tempButton->SetActionCallback({ [this, &tag] { c->RemoveTag(tag); } }); + tempButton->SetActionCallback({ [this, tag] { c->RemoveTag(tag); } }); tags.push_back(tempButton); AddComponent(tempButton); }