Changeset - r14770:5c4801f36873
[Not reviewed]
master
0 1 0
frosch - 14 years ago 2010-03-07 17:38:40
frosch@openttd.org
(svn r19368) -Codechange: Return early in AIAbstractList::SetValue(), if the value is not modified.
1 file changed with 1 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/ai/api/ai_abstractlist.cpp
Show inline comments
 
@@ -476,6 +476,7 @@ bool AIAbstractList::SetValue(int32 item
 
	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);
0 comments (0 inline, 0 general)