diff options
Diffstat (limited to 'src/train.h')
-rw-r--r-- | src/train.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/train.h b/src/train.h index 5958cde1a..3bbb6cafb 100644 --- a/src/train.h +++ b/src/train.h @@ -118,7 +118,7 @@ struct Train FINAL : public GroundVehicle<Train, VEH_TRAIN> { int GetDisplaySpeed() const { return this->gcache.last_speed; } int GetDisplayMaxSpeed() const { return this->vcache.cached_max_speed; } Money GetRunningCost() const; - int GetDisplayImageWidth(Point *offset = NULL) const; + int GetDisplayImageWidth(Point *offset = nullptr) const; bool IsInDepot() const { return this->track == TRACK_BIT_DEPOT; } bool Tick(); void OnNewDay(); @@ -146,7 +146,7 @@ struct Train FINAL : public GroundVehicle<Train, VEH_TRAIN> { inline Train *GetNextUnit() const { Train *v = this->GetNextVehicle(); - if (v != NULL && v->IsRearDualheaded()) v = v->GetNextVehicle(); + if (v != nullptr && v->IsRearDualheaded()) v = v->GetNextVehicle(); return v; } @@ -158,7 +158,7 @@ struct Train FINAL : public GroundVehicle<Train, VEH_TRAIN> { inline Train *GetPrevUnit() { Train *v = this->GetPrevVehicle(); - if (v != NULL && v->IsRearDualheaded()) v = v->GetPrevVehicle(); + if (v != nullptr && v->IsRearDualheaded()) v = v->GetPrevVehicle(); return v; } @@ -173,7 +173,7 @@ struct Train FINAL : public GroundVehicle<Train, VEH_TRAIN> { * longer than the part after the center. This means we have to round up the * length of the next vehicle but may not round the length of the current * vehicle. */ - return this->gcache.cached_veh_length / 2 + (this->Next() != NULL ? this->Next()->gcache.cached_veh_length + 1 : 0) / 2; + return this->gcache.cached_veh_length / 2 + (this->Next() != nullptr ? this->Next()->gcache.cached_veh_length + 1 : 0) / 2; } protected: // These functions should not be called outside acceleration code. |