mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Pass some strings and a vector as const refs.
Reviewed By: Imarok Differential Revision: https://code.wildfiregames.com/D160 This was SVN commit r19240.
This commit is contained in:
parent
1aa5ecb8a7
commit
a0a0895a12
4 changed files with 8 additions and 8 deletions
|
|
@ -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> scriptInterface = top()->GetScriptInterface();
|
||||
JSContext* cx = scriptInterface->GetContext();
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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<u8> GetGrid(std::string def, u16 w, u16 h)
|
||||
Grid<u8> GetGrid(const std::string& def, u16 w, u16 h)
|
||||
{
|
||||
Grid<u8> grid(w, h);
|
||||
const char* chars = def.c_str();
|
||||
|
|
@ -272,7 +272,7 @@ private:
|
|||
return grid;
|
||||
}
|
||||
|
||||
void TestBoundaryPointsEqual(std::vector<CVector2D> points, int expectedPoints[][2])
|
||||
void TestBoundaryPointsEqual(const std::vector<CVector2D>& 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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue