From 5d003c94a61ce384cdb79d1d155cc840d1fdd7b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sat, 13 Jul 2019 23:44:17 +0200 Subject: [PATCH] Instantiate Writer properly in MultiplayerGame.cpp rvalues can only be used to initialize *const* lvalue references. --- Entities/MultiplayerGame.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Entities/MultiplayerGame.cpp b/Entities/MultiplayerGame.cpp index 96db81e6b..4815cb9c0 100644 --- a/Entities/MultiplayerGame.cpp +++ b/Entities/MultiplayerGame.cpp @@ -373,7 +373,10 @@ namespace RTE } if (saveSettings) - g_SettingsMan.Save(Writer("Base.rte/Settings.ini")); + { + Writer w("Base.rte/Settings.ini"); + g_SettingsMan.Save(w); + } m_pGUIController->EnableMouse(false); m_Mode = CONNECTION; @@ -437,7 +440,10 @@ namespace RTE } if (saveSettings) - g_SettingsMan.Save(Writer("Base.rte/Settings.ini")); + { + Writer w("Base.rte/Settings.ini"); + g_SettingsMan.Save(w); + } m_pGUIController->EnableMouse(false); m_Mode = CONNECTION; @@ -523,4 +529,4 @@ namespace RTE Activity::Draw(pTargetBitmap, targetPos); } -} // namespace RTE \ No newline at end of file +} // namespace RTE