summaryrefslogtreecommitdiff
path: root/src/3rdparty
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2017-08-13 18:38:42 +0000
committerfrosch <frosch@openttd.org>2017-08-13 18:38:42 +0000
commitb4b98e51655012ea42dbc8ab9e455fbec0d04b39 (patch)
tree948fc802d5dfdca71454f6ce479e4f429e98488d /src/3rdparty
parent19bae485b028380fbdc94d02ebaecdf3ca23f932 (diff)
downloadopenttd-b4b98e51655012ea42dbc8ab9e455fbec0d04b39.tar.xz
(svn r27893) -Codechange: Use fallthrough attribute. (LordAro)
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/squirrel/squirrel/sqvm.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/3rdparty/squirrel/squirrel/sqvm.cpp b/src/3rdparty/squirrel/squirrel/sqvm.cpp
index 973002b49..a738244ba 100644
--- a/src/3rdparty/squirrel/squirrel/sqvm.cpp
+++ b/src/3rdparty/squirrel/squirrel/sqvm.cpp
@@ -215,7 +215,7 @@ bool SQVM::ObjCmp(const SQObjectPtr &o1,const SQObjectPtr &o2,SQInteger &result)
_RET_SUCCEED(_integer(res))
}
}
- //continues through (no break needed)
+ FALLTHROUGH;
default:
_RET_SUCCEED( _userpointer(o1) < _userpointer(o2)?-1:1 );
}
@@ -287,6 +287,7 @@ void SQVM::ToString(const SQObjectPtr &o,SQObjectPtr &res)
//else keeps going to the default
}
}
+ FALLTHROUGH;
default:
seprintf(buf, lastof(buf),"(%s : 0x%p)",GetTypeName(o),(void*)_rawval(o));
}
@@ -539,7 +540,7 @@ bool SQVM::FOREACH_OP(SQObjectPtr &o1,SQObjectPtr &o2,SQObjectPtr
_generator(o1)->Resume(this, arg_2+1);
_FINISH(0);
}
- /* FALL THROUGH */
+ FALLTHROUGH;
default:
Raise_Error("cannot iterate %s", GetTypeName(o1));
}
@@ -769,7 +770,7 @@ exception_restore:
ct_stackbase = _stackbase;
goto common_call;
}
- /* FALL THROUGH */
+ FALLTHROUGH;
case _OP_CALL: {
ct_tailcall = false;
ct_target = arg0;
@@ -1330,7 +1331,7 @@ bool SQVM::Set(const SQObjectPtr &self,const SQObjectPtr &key,const SQObjectPtr
return true;
}
}
- //keeps going
+ FALLTHROUGH;
case OT_USERDATA:
if(_delegable(self)->_delegate) {
SQObjectPtr t;