Codechange: Add base() method to StrongType to allow access to the base type without casting. (#11445)
This removes the ability to explicitly cast to the base type, but the requirement to use .base() means the conversion is still explicit.
This commit is contained in:
@@ -44,8 +44,8 @@
|
||||
}
|
||||
|
||||
/* Town properties */
|
||||
case 0x80: return static_cast<uint32_t>(this->t->xy);
|
||||
case 0x81: return GB(static_cast<uint32_t>(this->t->xy), 8, 8);
|
||||
case 0x80: return this->t->xy.base();
|
||||
case 0x81: return GB(this->t->xy.base(), 8, 8);
|
||||
case 0x82: return ClampTo<uint16_t>(this->t->cache.population);
|
||||
case 0x83: return GB(ClampTo<uint16_t>(this->t->cache.population), 8, 8);
|
||||
case 0x8A: return this->t->grow_counter / Ticks::TOWN_GROWTH_TICKS;
|
||||
|
Reference in New Issue
Block a user