summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2012-02-12 21:17:32 +0000
committersmatz <smatz@openttd.org>2012-02-12 21:17:32 +0000
commitb5525fd33dc965728ffc0e22efc0b1ba806ef807 (patch)
treec0d8203cd6c55766b17bbaeee2c83fc3ab2754a2 /src/script
parentf4de9b8a371fa1817aa4c0a47d224eb3b9779b0e (diff)
downloadopenttd-b5525fd33dc965728ffc0e22efc0b1ba806ef807.tar.xz
(svn r23941) -Add: support for clang
Diffstat (limited to 'src/script')
-rw-r--r--src/script/api/script_object.hpp1
-rw-r--r--src/script/api/script_vehiclelist.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/script/api/script_object.hpp b/src/script/api/script_object.hpp
index 4a39e618e..ba90f0c79 100644
--- a/src/script/api/script_object.hpp
+++ b/src/script/api/script_object.hpp
@@ -33,6 +33,7 @@ typedef bool (ScriptModeProc)();
*/
class ScriptObject : public SimpleCountedObject {
friend class ScriptInstance;
+friend class ScriptController;
protected:
/**
* A class that handles the current active instance. By instantiating it at
diff --git a/src/script/api/script_vehiclelist.cpp b/src/script/api/script_vehiclelist.cpp
index b8354acd3..3017266fa 100644
--- a/src/script/api/script_vehiclelist.cpp
+++ b/src/script/api/script_vehiclelist.cpp
@@ -123,7 +123,7 @@ ScriptVehicleList_DefaultGroup::ScriptVehicleList_DefaultGroup(ScriptVehicle::Ve
const Vehicle *v;
FOR_ALL_VEHICLES(v) {
if (v->owner == ScriptObject::GetCompany() && v->IsPrimaryVehicle()) {
- if (v->type == vehicle_type && v->group_id == ScriptGroup::GROUP_DEFAULT) this->AddItem(v->index);
+ if (v->type == (::VehicleType)vehicle_type && v->group_id == ScriptGroup::GROUP_DEFAULT) this->AddItem(v->index);
}
}
}