From daced4427b364ab820f9ed80e1ea541454235e8c Mon Sep 17 00:00:00 2001 From: FutureRave Date: Tue, 16 Nov 2021 18:33:32 +0000 Subject: [PATCH] Use auto --- src/Components/Modules/Dedicated.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Components/Modules/Dedicated.cpp b/src/Components/Modules/Dedicated.cpp index 68223880..92728421 100644 --- a/src/Components/Modules/Dedicated.cpp +++ b/src/Components/Modules/Dedicated.cpp @@ -131,8 +131,8 @@ namespace Components { if (i + 1 >= tokens.size()) break; - const std::string key = tokens[i]; - const std::string value = tokens[i + 1]; + const auto& key = tokens[i]; + const auto& value = tokens[i + 1]; mapRotationPair.push_back(std::make_pair(key, value)); } @@ -143,7 +143,7 @@ namespace Components rotation.clear(); for (auto j = 0u; j < mapRotationPair.size(); j++) { - std::pair pair = mapRotationPair[j]; + const auto& pair = mapRotationPair[j]; rotation.append(pair.first); rotation.append(" "); rotation.append(pair.second); @@ -196,7 +196,7 @@ namespace Components if (Dedicated::SVRandomMapRotation.get()) { - Logger::Print("Randomizing map rotaion\n"); + Logger::Print("Randomizing map rotation\n"); Dedicated::RandomizeMapRotation(); } else