summaryrefslogtreecommitdiff
path: root/src/train.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-02 09:06:15 +0000
committerrubidium <rubidium@openttd.org>2009-07-02 09:06:15 +0000
commit4d14c1b534947ed38780995af4d68bd67b4ae095 (patch)
tree5afca0f6bf0a5a885285f85755c0cdfa42c7d70f /src/train.h
parent61e735ba4c62e578ca16f708ac1fdc872ff6416d (diff)
downloadopenttd-4d14c1b534947ed38780995af4d68bd67b4ae095.tar.xz
(svn r16722) -Codechange: unify the naming of the Is/Set/HasArticulatedPart functions
Diffstat (limited to 'src/train.h')
-rw-r--r--src/train.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/train.h b/src/train.h
index 4476bb7ff..df717dd0c 100644
--- a/src/train.h
+++ b/src/train.h
@@ -259,7 +259,7 @@ struct Train : public SpecializedVehicle<Train, VEH_TRAIN> {
* Check if an engine has an articulated part.
* @return True if the engine has an articulated part.
*/
- FORCEINLINE bool EngineHasArticPart() const { return this->Next() != NULL && this->Next()->IsArticulatedPart(); }
+ FORCEINLINE bool HasArticulatedPart() const { return this->Next() != NULL && this->Next()->IsArticulatedPart(); }
};
@@ -267,12 +267,12 @@ struct Train : public SpecializedVehicle<Train, VEH_TRAIN> {
/**
* Get the next part of a multi-part engine.
- * Will only work on a multi-part engine (v->EngineHasArticPart() == true),
+ * Will only work on a multi-part engine (v->HasArticulatedPart() == true),
* Result is undefined for normal engine.
*/
static inline Train *GetNextArticPart(const Train *v)
{
- assert(v->EngineHasArticPart());
+ assert(v->HasArticulatedPart());
return v->Next();
}
@@ -282,7 +282,7 @@ static inline Train *GetNextArticPart(const Train *v)
*/
static inline Train *GetLastEnginePart(Train *v)
{
- while (v->EngineHasArticPart()) v = GetNextArticPart(v);
+ while (v->HasArticulatedPart()) v = GetNextArticPart(v);
return v;
}
@@ -292,7 +292,7 @@ static inline Train *GetLastEnginePart(Train *v)
*/
static inline Train *GetNextVehicle(const Train *v)
{
- while (v->EngineHasArticPart()) v = GetNextArticPart(v);
+ while (v->HasArticulatedPart()) v = GetNextArticPart(v);
/* v now contains the last artic part in the engine */
return v->Next();