(svn r27908) -Codechange: Mark airport tile tables and FTAs "const" to be sure that they are really constant

This commit is contained in:
adf88
2017-08-31 06:55:38 +00:00
parent b56453f93b
commit 6dec889306
4 changed files with 24 additions and 24 deletions

View File

@@ -3750,7 +3750,7 @@ static ChangeInfoResult AirportChangeInfo(uint airport, int numinfo, int prop, B
const AirportTileTable *copy_from;
try {
for (byte j = 0; j < as->num_table; j++) {
as->rotation[j] = (Direction)buf->ReadByte();
const_cast<Direction&>(as->rotation[j]) = (Direction)buf->ReadByte();
for (int k = 0;; k++) {
att[k].ti.x = buf->ReadByte(); // Offsets from northermost tile
att[k].ti.y = buf->ReadByte();