(svn r11369) -Codechange [FS#1390]: changes some int to int8 in macros.h, as they describe a bit-position, which fits perfectly in an int8 (max 64) (skidd13)

-Codechange [FS#1390]: added consts in macros.h functions, so compilers can optimise better (skidd13)
-Codechange [FS#1390]: remove HAS_SINGLE_BIT, as COUNTBITS does the same (skidd13)
This commit is contained in:
truelight
2007-11-02 16:57:52 +00:00
parent 8932887524
commit 71ba45cdfb
2 changed files with 27 additions and 31 deletions

View File

@@ -906,7 +906,7 @@ Foundation GetRoadFoundation(Slope tileh, RoadBits bits)
* created directly, but the state itself is still perfectly drawable.
* However, as we do not want this to be build directly, we need to check
* for that situation in here. */
return (tileh != 0 && HAS_SINGLE_BIT(bits)) ? FOUNDATION_LEVELED : FOUNDATION_NONE;
return (tileh != 0 && COUNTBITS(bits) == 1) ? FOUNDATION_LEVELED : FOUNDATION_NONE;
}
if ((~_valid_tileh_slopes_road[1][tileh] & bits) == 0) return FOUNDATION_LEVELED;
}