1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-17 09:22:42 +01:00

(svn r19368) -Codechange: Return early in AIAbstractList::SetValue(), if the value is not modified.

This commit is contained in:
frosch
2010-03-07 17:38:40 +00:00
parent 5734683a39
commit f0de6366ba

View File

@@ -476,6 +476,7 @@ bool AIAbstractList::SetValue(int32 item, int32 value)
if (!this->HasItem(item)) return false;
int32 value_old = this->GetValue(item);
if (value_old == value) return true;
this->sorter->Remove(item);
this->buckets[value_old].erase(item);