summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-06-27 21:36:04 +0000
committerfrosch <frosch@openttd.org>2009-06-27 21:36:04 +0000
commit1e09854cb7484a0317de81d412c6a541a96dacb6 (patch)
tree5d8389a9efbf993b4e39c605d7aa0d5024b6d581 /src/ai
parenta288e4d82ff85819aa49061d66ee7e0cfd87e802 (diff)
downloadopenttd-1e09854cb7484a0317de81d412c6a541a96dacb6.tar.xz
(svn r16679) -Codechange: Let GetCapacityOfArticulatedParts() return a CargoArray instead of a pointer to a static array.
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/api/ai_engine.cpp2
-rw-r--r--src/ai/api/ai_event_types.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/api/ai_engine.cpp b/src/ai/api/ai_engine.cpp
index b8be61069..8f5bf2167 100644
--- a/src/ai/api/ai_engine.cpp
+++ b/src/ai/api/ai_engine.cpp
@@ -70,7 +70,7 @@
switch (e->type) {
case VEH_ROAD:
case VEH_TRAIN: {
- uint16 *capacities = GetCapacityOfArticulatedParts(engine_id, e->type);
+ CargoArray capacities = GetCapacityOfArticulatedParts(engine_id, e->type);
for (CargoID c = 0; c < NUM_CARGO; c++) {
if (capacities[c] == 0) continue;
return capacities[c];
diff --git a/src/ai/api/ai_event_types.cpp b/src/ai/api/ai_event_types.cpp
index 80607220d..0f757be18 100644
--- a/src/ai/api/ai_event_types.cpp
+++ b/src/ai/api/ai_event_types.cpp
@@ -35,7 +35,7 @@ int32 AIEventEnginePreview::GetCapacity()
switch (e->type) {
case VEH_ROAD:
case VEH_TRAIN: {
- uint16 *capacities = GetCapacityOfArticulatedParts(engine, e->type);
+ CargoArray capacities = GetCapacityOfArticulatedParts(engine, e->type);
for (CargoID c = 0; c < NUM_CARGO; c++) {
if (capacities[c] == 0) continue;
return capacities[c];