mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
declare gFullBaseTileValues extern like every other global here
tiledef.h is included by 1900 objects, and each one was compiling a tentative
definition of gFullBaseTileValues rather than a declaration of it. The array
is defined once in TileDat.cpp, and every other global in the same block is
already declared extern; this one was missed.
MSVC accepts it and merges the tentative definitions, so nothing was visibly
broken. A conforming front end rejects it outright:
tiledef.h(180,12): error: definition of variable with array type needs
an explicit size or an initializer
which is what turned it up.
Verification: ninja -C build -k 0, all four applications link.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
committed by
majcosta
co-authored by
Claude Opus 4.8
parent
3d3e1bbfc6
commit
aad39ac3bd
@@ -177,7 +177,7 @@ typedef struct
|
||||
// Globals used
|
||||
extern TILE_ELEMENT gTileDatabase[ NUMBEROFTILES ];
|
||||
extern UINT16 gTileDatabaseSize;
|
||||
UINT8 gFullBaseTileValues[];
|
||||
extern UINT8 gFullBaseTileValues[];
|
||||
extern UINT16 gNumTilesPerType[ NUMBEROFTILETYPES ];
|
||||
extern UINT16 gTileTypeStartIndex[ NUMBEROFTILETYPES ];
|
||||
extern STR gTileSurfaceName[NUMBEROFTILETYPES];
|
||||
|
||||
Reference in New Issue
Block a user