mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-02 09:40:35 +00:00
(svn r27690) -Fix: Old compilers do not zero-initialise POD members when explicitly calling implicitly created default constructors.
This commit is contained in:
parent
1db921bedb
commit
4e2ecbb5a1
@ -68,7 +68,16 @@ void ResetRailTypes()
|
||||
|
||||
uint i = 0;
|
||||
for (; i < lengthof(_original_railtypes); i++) _railtypes[i] = _original_railtypes[i];
|
||||
for (; i < lengthof(_railtypes); i++) _railtypes[i] = RailtypeInfo(); // zero-init
|
||||
|
||||
static const RailtypeInfo empty_railtype = {
|
||||
{0,0,0,0,0,0,0,0,0,0,0,0},
|
||||
{0,0,0,0,0,0,0,0,{}},
|
||||
{0,0,0,0,0,0,0,0},
|
||||
{0,0,0,0,0,0},
|
||||
0, RAILTYPES_NONE, RAILTYPES_NONE, 0, 0, 0, RTFB_NONE, 0, 0, 0, 0, 0,
|
||||
RailTypeLabelList(), 0, 0, RAILTYPES_NONE, RAILTYPES_NONE, 0,
|
||||
{}, {} };
|
||||
for (; i < lengthof(_railtypes); i++) _railtypes[i] = empty_railtype;
|
||||
}
|
||||
|
||||
void ResolveRailTypeGUISprites(RailtypeInfo *rti)
|
||||
|
Loading…
Reference in New Issue
Block a user