mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-05-04 10:51:39 -04:00
definition optimized .
This commit is contained in:
parent
a2a5f867b5
commit
a4e03c3f6e
2 changed files with 7 additions and 4 deletions
|
@ -3814,10 +3814,13 @@ void CMapData::UpdateTreeInfo(const CString* lpTreeType)
|
|||
}
|
||||
}
|
||||
|
||||
int CMapData::GetBuildingID(LPCSTR lpBuildingName)
|
||||
int CMapData::GetBuildingID(const CString& lpBuildingName)
|
||||
{
|
||||
if (buildingid.find(lpBuildingName) == buildingid.end()) return -1;
|
||||
return buildingid[lpBuildingName];
|
||||
auto const it = buildingid.find(lpBuildingName);
|
||||
if (it == buildingid.end()) {
|
||||
return -1;
|
||||
}
|
||||
return it->second;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -399,7 +399,7 @@ public:
|
|||
}
|
||||
|
||||
|
||||
int GetBuildingID(LPCSTR lpBuildingName);
|
||||
int GetBuildingID(const CString& lpBuildingName);
|
||||
void ImportRUL(LPCTSTR lpFilename);
|
||||
void ExportRulesChanges(const char* filename);
|
||||
void DeleteRulesSections();
|
||||
|
|
Loading…
Add table
Reference in a new issue