Rework handling of property 0x0A in IndustriesChangeInfo
commit4f00e5de1b54ad7f88630ab1a9ee389b792a4f51
authorcirdan <cirdansw@gmail.com>
Fri, 24 Nov 2017 20:16:48 +0000 (24 21:16 +0100)
committercirdan <cirdansw@gmail.com>
Fri, 24 Nov 2017 20:16:48 +0000 (24 21:16 +0100)
tree4828fb42b3f6d64c8f4886728ddd0e96583fcfd9
parent385f49c9749d50c448845503726e1ef44f4a8aee
Rework handling of property 0x0A in IndustriesChangeInfo

Scan the whole property payload in advance to count how many tiles
there are in each layout, so that no memory allocations are needed
until all the information has been scanned and we can avoid the
try-catch block.
src/newgrf.cpp