forked from mirrors/0ad
# 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:
+3
-3
@@ -321,7 +321,7 @@ void CGUI::TickObjects()
|
||||
m_Tooltip.Update(pNearest, m_MousePos, this);
|
||||
}
|
||||
|
||||
void CGUI::SendEventToAll(CStr EventName)
|
||||
void CGUI::SendEventToAll(const CStr& EventName)
|
||||
{
|
||||
// janwas 2006-03-03: spoke with Ykkrosh about EventName case.
|
||||
// when registering, case is converted to lower - this avoids surprise
|
||||
@@ -621,7 +621,7 @@ struct SGenerateTextImage
|
||||
// TODO Gee: CRect => CPoint ?
|
||||
void SetupSpriteCall(const bool Left, SGUIText::SSpriteCall &SpriteCall,
|
||||
const float width, const float y,
|
||||
const CSize &Size, const CStr &TextureName,
|
||||
const CSize &Size, const CStr& TextureName,
|
||||
const float BufferZone, const int CellID)
|
||||
{
|
||||
// TODO Gee: Temp hardcoded values
|
||||
@@ -1001,7 +1001,7 @@ void CGUI::DrawText(SGUIText &Text, const CColor &DefaultColor,
|
||||
// -- GL
|
||||
}
|
||||
|
||||
bool CGUI::GetPreDefinedColor(const CStr &name, CColor &Output)
|
||||
bool CGUI::GetPreDefinedColor(const CStr& name, CColor &Output)
|
||||
{
|
||||
if (m_PreDefinedColors.count(name) == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user