diff --git a/source/gui/GUIManager.cpp b/source/gui/GUIManager.cpp index 3a0cb7de01..1444382814 100644 --- a/source/gui/GUIManager.cpp +++ b/source/gui/GUIManager.cpp @@ -319,7 +319,7 @@ std::string CGUIManager::GetSavedGameData() return scriptInterface->StringifyJSON(&data, false); } -void CGUIManager::RestoreSavedGameData(std::string jsonData) +void CGUIManager::RestoreSavedGameData(const std::string& jsonData) { shared_ptr scriptInterface = top()->GetScriptInterface(); JSContext* cx = scriptInterface->GetContext(); diff --git a/source/gui/GUIManager.h b/source/gui/GUIManager.h index 2310756103..b2e409fb50 100644 --- a/source/gui/GUIManager.h +++ b/source/gui/GUIManager.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2016 Wildfire Games. +/* Copyright (C) 2017 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -142,7 +142,7 @@ public: */ std::string GetSavedGameData(); - void RestoreSavedGameData(std::string jsonData); + void RestoreSavedGameData(const std::string& jsonData); /** * Check if a template with this name exists diff --git a/source/simulation2/components/tests/test_TerritoryManager.h b/source/simulation2/components/tests/test_TerritoryManager.h index e218aac75f..6e2fa77453 100644 --- a/source/simulation2/components/tests/test_TerritoryManager.h +++ b/source/simulation2/components/tests/test_TerritoryManager.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2012 Wildfire Games. +/* Copyright (C) 2017 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -250,7 +250,7 @@ private: /// Parses a string representation of a grid into an actual Grid structure, such that the (i,j) axes are located in the bottom /// left hand side of the map. Note: leaves all custom bits in the grid values at zero (anything outside /// ICmpTerritoryManager::TERRITORY_PLAYER_MASK). - Grid GetGrid(std::string def, u16 w, u16 h) + Grid GetGrid(const std::string& def, u16 w, u16 h) { Grid grid(w, h); const char* chars = def.c_str(); @@ -272,7 +272,7 @@ private: return grid; } - void TestBoundaryPointsEqual(std::vector points, int expectedPoints[][2]) + void TestBoundaryPointsEqual(const std::vector& points, int expectedPoints[][2]) { // TODO: currently relies on an exact point match, i.e. expectedPoints must be specified going CCW or CW (depending on // whether we're testing an inner or an outer edge) starting from the exact same point that the algorithm happened to diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp index acf306b90c..93c17f8d9b 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/Sections/Object/Object.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2015 Wildfire Games. +/* Copyright (C) 2017 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -483,7 +483,7 @@ ObjectBottomBar::ObjectBottomBar( SetSizer(mainSizer); } -static wxControl* CreateTemplateNameObject(wxWindow* parent, const std::string templateName, int counterTemplate) +static wxControl* CreateTemplateNameObject(wxWindow* parent, const std::string& templateName, int counterTemplate) { wxString idTemplate(wxString::FromUTF8(templateName.c_str())); if (counterTemplate > 1)