TITANIC: Adjust the switch/case fall-through comments

This way, GCC 7 does not generate a warning for those cases when
-Wimplicit-fallthrough=3 is enabled, which is now the default.
This commit is contained in:
Bastien Bouclet 2017-07-23 11:12:12 +02:00
parent 96a1b70700
commit bc952807ec
10 changed files with 30 additions and 29 deletions

View File

@ -141,27 +141,27 @@ void CGameObject::load(SimpleFile *file) {
case 7:
_movieRangeInfoList.load(file);
_frameNumber = file->readNumber();
// Deliberate fall-through
// Intentional fall-through
case 6:
_cursorId = (CursorId)file->readNumber();
// Deliberate fall-through
// Intentional fall-through
case 5:
_movieClips.load(file);
// Deliberate fall-through
// Intentional fall-through
case 4:
_handleMouseFlag = file->readNumber();
// Deliberate fall-through
// Intentional fall-through
case 3:
_nonvisual = file->readNumber();
// Deliberate fall-through
// Intentional fall-through
case 2:
_resource = file->readString();
// Deliberate fall-through
// Intentional fall-through
case 1:
_bounds = file->readBounds();

View File

@ -96,11 +96,11 @@ void CLinkItem::load(SimpleFile *file) {
switch (val) {
case 2:
_cursorId = (CursorId)file->readNumber();
// Deliberate fall-through
// Intentional fall-through
case 1:
_linkMode = file->readNumber();
// Deliberate fall-through
// Intentional fall-through
case 0:
_roomNumber = file->readNumber();

View File

@ -102,7 +102,7 @@ void CProjectItem::load(SimpleFile *file) {
case 1:
file->readBuffer();
_nextRoomNumber = file->readNumber();
// Deliberate fall-through
// Intentional fall-through
case 0:
// Load the list of files
@ -116,16 +116,16 @@ void CProjectItem::load(SimpleFile *file) {
case 6:
file->readBuffer();
_nextObjectNumber = file->readNumber();
// Deliberate fall-through
// Intentional fall-through
case 5:
file->readBuffer();
_nextMessageNumber = file->readNumber();
// Deliberate fall-through
// Intentional fall-through
case 4:
file->readBuffer();
// Deliberate fall-through
// Intentional fall-through
case 2:
case 3:

View File

@ -65,14 +65,14 @@ void CRoomItem::load(SimpleFile *file) {
// Read exit movie
file->readBuffer();
_exitMovieKey.load(file);
// Deliberate fall-through
// Intentional fall-through
case 2:
// Read room dimensions
file->readBuffer();
_roomDimensionX = (double)file->readNumber() / 1000.0;
_roomDimensionY = (double)file->readNumber() / 1000.0;
// Deliberate fall-through
// Intentional fall-through
case 1:
// Read transition movie key and clip list
@ -82,7 +82,7 @@ void CRoomItem::load(SimpleFile *file) {
file->readBuffer();
_clipList.load(file);
postLoad();
// Deliberate fall-through
// Intentional fall-through
case 0:
// Read room rect

View File

@ -67,7 +67,7 @@ void CViewItem::load(SimpleFile *file) {
switch (val) {
case 1:
_resourceKey.load(file);
// Deliberate fall-through
// Intentional fall-through
default:
file->readBuffer();

View File

@ -52,35 +52,35 @@ void CPlaceHolderItem::load(SimpleFile *file) {
switch (file->readNumber()) {
case 7:
_field7C = file->readNumber();
// Deliberate fall-through
// Intentional fall-through
case 6:
file->readString();
_clips.load(file);
// Deliberate fall-through
// Intentional fall-through
case 5:
_field68 = file->readNumber();
// Deliberate fall-through
// Intentional fall-through
case 4:
_field64 = file->readNumber();
// Deliberate fall-through
// Intentional fall-through
case 3:
_field60 = file->readNumber();
// Deliberate fall-through
// Intentional fall-through
case 2:
_list.load(file);
// Deliberate fall-through
// Intentional fall-through
case 1:
_string2 = file->readString();
_field4C = file->readNumber();
_pos1 = file->readPoint();
_pos2 = file->readPoint();
// Deliberate fall-through
// Intentional fall-through
case 0:
_string1 = file->readString();

View File

@ -43,16 +43,16 @@ void CVariableListItem::load(SimpleFile *file) {
switch (file->readNumber()) {
case 3:
field44 = file->readNumber();
// Deliberate fall-through
// Intentional fall-through
case 2:
_string1 = file->readString();
_field18 = file->readNumber();
// Deliberate fall-through
// Intentional fall-through
case 1:
field40 = file->readNumber();
// Deliberate fall-through
// Intentional fall-through
case 0:
_string2 = file->readString();

View File

@ -158,7 +158,8 @@ void CMainGameWindow::draw() {
_project->loadGame(_pendingLoadSlot);
_pendingLoadSlot = -1;
// Deliberate fall-through to draw loaded game
// Intentional fall-through
// to draw loaded game
case GSMODE_INTERACTIVE:
case GSMODE_CUTSCENE:

View File

@ -315,7 +315,7 @@ int BarbotScript::process(const TTroomScript *roomScript, const TTsentence *sent
} else if (flag2) {
return applySentenceIds(51423);
}
// Deliberate fall-through
// Intentional fall-through
case 16:
if (val2C == 7 || val2C == 10)

View File

@ -389,7 +389,7 @@ ScriptChangedResult BellbotScript::scriptChanged(const TTroomScript *roomScript,
_responseFlag = false;
CTrueTalkManager::_v9 = 0;
// Deliberate fall-through
// Intentional fall-through
default:
if (roomScript->_scriptId == 115 && id == 103) {
switch (getValue(4)) {