Skip to content

Commit

Permalink
Codechange: Use rail/road type label constants instead of literals. (…
Browse files Browse the repository at this point in the history
…#11450)
  • Loading branch information
PeterN authored Nov 8, 2023
1 parent 382d7a9 commit 9f90ab7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 3 additions & 0 deletions src/road_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

typedef uint32_t RoadTypeLabel;

static const RoadTypeLabel ROADTYPE_ROAD_LABEL = 'ROAD';
static const RoadTypeLabel ROADTYPE_TRAM_LABEL = 'ELRL';

/**
* The different roadtypes we support
*
Expand Down
8 changes: 4 additions & 4 deletions src/table/railtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static const RailTypeInfo _original_railtypes[] = {
0,

/* rail type label */
'RAIL',
RAILTYPE_RAIL_LABEL,

/* alternate labels */
RailTypeLabelList(),
Expand Down Expand Up @@ -191,7 +191,7 @@ static const RailTypeInfo _original_railtypes[] = {
0,

/* rail type label */
'ELRL',
RAILTYPE_ELECTRIC_LABEL,

/* alternate labels */
RailTypeLabelList(),
Expand Down Expand Up @@ -288,7 +288,7 @@ static const RailTypeInfo _original_railtypes[] = {
0,

/* rail type label */
'MONO',
RAILTYPE_MONO_LABEL,

/* alternate labels */
RailTypeLabelList(),
Expand Down Expand Up @@ -385,7 +385,7 @@ static const RailTypeInfo _original_railtypes[] = {
0,

/* rail type label */
'MGLV',
RAILTYPE_MAGLEV_LABEL,

/* alternate labels */
RailTypeLabelList(),
Expand Down
4 changes: 2 additions & 2 deletions src/table/roadtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static const RoadTypeInfo _original_roadtypes[] = {
0,

/* road type label */
'ROAD',
ROADTYPE_ROAD_LABEL,

/* alternate labels */
RoadTypeLabelList(),
Expand Down Expand Up @@ -153,7 +153,7 @@ static const RoadTypeInfo _original_roadtypes[] = {
0,

/* road type label */
'ELRL',
ROADTYPE_TRAM_LABEL,

/* alternate labels */
RoadTypeLabelList(),
Expand Down

0 comments on commit 9f90ab7

Please sign in to comment.