From a9f009f97fe85b012f5ccc0ca2aab745edb2f717 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Tue, 12 Sep 2017 01:40:11 +0200 Subject: [PATCH] rwgame: do not copy cheat names --- rwgame/RWGame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rwgame/RWGame.cpp b/rwgame/RWGame.cpp index 785443c5..c1be395e 100644 --- a/rwgame/RWGame.cpp +++ b/rwgame/RWGame.cpp @@ -170,7 +170,7 @@ void RWGame::handleCheatInput(char symbol) { cheatInputWindow = cheatInputWindow.substr(1) + symbol; // Helper to check for cheats - auto checkForCheat = [this](std::string cheat, + auto checkForCheat = [this](const std::string& cheat, std::function action) { RW_CHECK(cheatInputWindow.length() >= cheat.length(), "Cheat too long"); size_t offset = cheatInputWindow.length() - cheat.length();