diff options
author | rubidium <rubidium@openttd.org> | 2010-08-01 18:53:30 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-08-01 18:53:30 +0000 |
commit | e356cb94050797cccbf05b3a411105528da8ee90 (patch) | |
tree | 3d98354dc5983a03e685f116b1b5c5b73607de0f /src/ai | |
parent | 605f6d0ed3c81a77d533f3db40ed50350d57536c (diff) | |
download | openttd-e356cb94050797cccbf05b3a411105528da8ee90.tar.xz |
(svn r20281) -Codechange: unify case scope closure + break coding style
Diffstat (limited to 'src/ai')
-rw-r--r-- | src/ai/api/ai_abstractlist.cpp | 6 | ||||
-rw-r--r-- | src/ai/api/ai_engine.cpp | 2 | ||||
-rw-r--r-- | src/ai/api/ai_event_types.cpp | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/ai/api/ai_abstractlist.cpp b/src/ai/api/ai_abstractlist.cpp index ec2b7d4f5..e51713465 100644 --- a/src/ai/api/ai_abstractlist.cpp +++ b/src/ai/api/ai_abstractlist.cpp @@ -808,13 +808,15 @@ SQInteger AIAbstractList::Valuate(HSQUIRRELVM vm) switch (sq_gettype(vm, -1)) { case OT_INTEGER: { sq_getinteger(vm, -1, &value); - } break; + break; + } case OT_BOOL: { SQBool v; sq_getbool(vm, -1, &v); value = v ? 1 : 0; - } break; + break; + } default: { /* See below for explanation. The extra pop is the return value. */ diff --git a/src/ai/api/ai_engine.cpp b/src/ai/api/ai_engine.cpp index c235255ba..7710360e8 100644 --- a/src/ai/api/ai_engine.cpp +++ b/src/ai/api/ai_engine.cpp @@ -95,7 +95,7 @@ return capacities[c]; } return -1; - } break; + } case VEH_SHIP: case VEH_AIRCRAFT: diff --git a/src/ai/api/ai_event_types.cpp b/src/ai/api/ai_event_types.cpp index d1e962c4c..b61e07605 100644 --- a/src/ai/api/ai_event_types.cpp +++ b/src/ai/api/ai_event_types.cpp @@ -56,7 +56,7 @@ int32 AIEventEnginePreview::GetCapacity() return capacities[c]; } return -1; - } break; + } case VEH_SHIP: case VEH_AIRCRAFT: |