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:
Peter Nelson
2023-11-06 20:29:35 +00:00
committed by GitHub
parent 737775f834
commit ab535c0a86
73 changed files with 174 additions and 173 deletions

View File

@@ -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;