mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-13 17:44:48 +00:00
# housekeeping
replaced all (*) CStr / CStrW by-value params with const reference. hoo boy. please always perform this optimization (actually standard idiom) when writing the code - it takes little work, tells the next guy that the string won't be modified, and makes a large performance difference. (* where possible.. a few require other changes and will follow later) This was SVN commit r4151.
This commit is contained in:
@@ -73,7 +73,7 @@ CTerrainPropertiesPtr CTextureManager::GetPropertiesFromFile(CTerrainPropertiesP
|
||||
return CTerrainProperties::FromXML(props, path);
|
||||
}
|
||||
|
||||
CTextureEntry *CTextureManager::AddTexture(CTerrainPropertiesPtr props, CStr path)
|
||||
CTextureEntry *CTextureManager::AddTexture(CTerrainPropertiesPtr props, const CStr& path)
|
||||
{
|
||||
CTextureEntry *entry = new CTextureEntry(props, path);
|
||||
m_TextureEntries.push_back(entry);
|
||||
@@ -177,7 +177,7 @@ int CTextureManager::LoadTerrainTextures()
|
||||
return 0;
|
||||
}
|
||||
|
||||
CTerrainGroup *CTextureManager::FindGroup(CStr name)
|
||||
CTerrainGroup *CTextureManager::FindGroup(const CStr& name)
|
||||
{
|
||||
TerrainGroupMap::const_iterator it=m_TerrainGroups.find(name);
|
||||
if (it != m_TerrainGroups.end())
|
||||
|
||||
Reference in New Issue
Block a user