mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-04-30 09:01:41 -04:00
minor optimization for GetFreeID .
This commit is contained in:
parent
3a0c12e52a
commit
9a259ec5b0
1 changed files with 6 additions and 9 deletions
|
@ -1288,19 +1288,16 @@ CString GetFreeID()
|
|||
"Actions",
|
||||
"AITriggerTypes",
|
||||
};
|
||||
|
||||
// 0=GAPOWR ...
|
||||
for (auto const& id : typeLists) {
|
||||
for (auto const& [_, id] : ini[id]) {
|
||||
if (id == input) {
|
||||
return true;
|
||||
}
|
||||
if (ini[id].HasValue(input)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// 1000000=Foo, ...
|
||||
for (auto const& id : itemLists) {
|
||||
for (auto const& [id, _] : ini[id]) {
|
||||
if (id == input) {
|
||||
return true;
|
||||
}
|
||||
if (ini[id].Exists(input)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue