Changeset - r10953:857844cabc20
[Not reviewed]
master
0 1 0
belugas - 15 years ago 2009-01-29 03:07:34
belugas@openttd.org
(svn r15292) -Fix(r15290): Incrementing something that is already set to the correct value is a bit of a no-no
Also, protect against such misuse with an assert.
1 file changed with 1 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/unmovable_map.h
Show inline comments
 
@@ -166,8 +166,7 @@ static inline void SetCompanyHQSection(T
 
static inline void EnlargeCompanyHQ(TileIndex t, byte size)
 
{
 
	assert(GetCompanyHQSection(t) == 0);
 

	
 
	size++;
 
	assert(size <= 4);
 
	if (size <= GetCompanyHQSize(t)) return;
 

	
 
	SetCompanyHQSize(t                   , size);
0 comments (0 inline, 0 general)