Codechange: make TimerGameCalendar Date and Year types strongly typed (#10761)

This commit is contained in:
Patric Stout
2023-08-12 20:14:21 +02:00
committed by GitHub
parent 0238a2b567
commit 299570b2c1
55 changed files with 390 additions and 203 deletions

View File

@@ -277,7 +277,7 @@ static uint32_t GetCountAndDistanceOfClosestInstance(byte local_id, uint32_t grf
break;
/* Construction date */
case 0x42: return TimerGameCalendar::date;
case 0x42: return static_cast<int32_t>(TimerGameCalendar::date);
/* Object founder information */
case 0x44: return _current_company;
@@ -315,7 +315,7 @@ static uint32_t GetCountAndDistanceOfClosestInstance(byte local_id, uint32_t grf
case 0x41: return GetTileSlope(this->tile) << 8 | GetTerrainType(this->tile);
/* Construction date */
case 0x42: return this->obj->build_date;
case 0x42: return static_cast<int32_t>(this->obj->build_date);
/* Animation counter */
case 0x43: return GetAnimationFrame(this->tile);