mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-10-13 15:34:37 +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:
@@ -25,7 +25,7 @@ CTechnology::CTechnology( CPlayer* player ) : m_player(player)
|
||||
m_JSFirst = false;
|
||||
m_inProgress = false;
|
||||
}
|
||||
bool CTechnology::loadXML( CStr filename )
|
||||
bool CTechnology::loadXML( const CStr& filename )
|
||||
{
|
||||
CXeromyces XeroFile;
|
||||
|
||||
@@ -176,7 +176,7 @@ bool CTechnology::loadELReq( XMBElement Req, CXeromyces& XeroFile )
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bool CTechnology::loadELEffect( XMBElement effect, CXeromyces& XeroFile, CStr& filename )
|
||||
bool CTechnology::loadELEffect( XMBElement effect, CXeromyces& XeroFile, const CStr& filename )
|
||||
{
|
||||
#define EL(x) int el_##x = XeroFile.getElementID(#x)
|
||||
#define AT(x) int at_##x = XeroFile.getAttributeID(#x)
|
||||
|
||||
Reference in New Issue
Block a user