Codechange: replace x.size() == 0 with x.empty()
This commit is contained in:
@@ -140,7 +140,7 @@ SpriteID GetCustomSignalSprite(const RailTypeInfo *rti, TileIndex tile, SignalTy
|
||||
*/
|
||||
RailType GetRailTypeTranslation(uint8_t railtype, const GRFFile *grffile)
|
||||
{
|
||||
if (grffile == nullptr || grffile->railtype_list.size() == 0) {
|
||||
if (grffile == nullptr || grffile->railtype_list.empty()) {
|
||||
/* No railtype table present. Return railtype as-is (if valid), so it works for original railtypes. */
|
||||
if (railtype >= RAILTYPE_END || GetRailTypeInfo(static_cast<RailType>(railtype))->label == 0) return INVALID_RAILTYPE;
|
||||
|
||||
@@ -163,7 +163,7 @@ RailType GetRailTypeTranslation(uint8_t railtype, const GRFFile *grffile)
|
||||
uint8_t GetReverseRailTypeTranslation(RailType railtype, const GRFFile *grffile)
|
||||
{
|
||||
/* No rail type table present, return rail type as-is */
|
||||
if (grffile == nullptr || grffile->railtype_list.size() == 0) return railtype;
|
||||
if (grffile == nullptr || grffile->railtype_list.empty()) return railtype;
|
||||
|
||||
/* Look for a matching rail type label in the table */
|
||||
RailTypeLabel label = GetRailTypeInfo(railtype)->label;
|
||||
|
Reference in New Issue
Block a user