aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorD G Turner2019-10-02 06:12:38 +0100
committerD G Turner2019-10-02 06:12:38 +0100
commit78ef4b9499200d9c55e5ed537f7f037538583367 (patch)
tree8d072179a25144b2aa918b9d82a223622e703fc3
parent3971ce13f8cf40e47ace774688e3eeb8712bae0c (diff)
downloadscummvm-rg350-78ef4b9499200d9c55e5ed537f7f037538583367.tar.gz
scummvm-rg350-78ef4b9499200d9c55e5ed537f7f037538583367.tar.bz2
scummvm-rg350-78ef4b9499200d9c55e5ed537f7f037538583367.zip
COMMON: Add Default Cases to Switch Statements in Memstream Classes
These are flagged by GCC if -Wswitch-default is enabled. This avoids possible hard to diagnose bugs if the whence int parameter is accidently set to an unexpected value.
-rw-r--r--common/memstream.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/common/memstream.h b/common/memstream.h
index 991268ce10..68cfdce97c 100644
--- a/common/memstream.h
+++ b/common/memstream.h
@@ -137,6 +137,8 @@ public:
offset = size() + offset;
// Fall through
case SEEK_SET:
+ // Fall through
+ default:
_ptr = _ptrOrig + offset;
_pos = offset;
break;
@@ -219,6 +221,8 @@ public:
offs = _size + offs;
// Fall through
case SEEK_SET:
+ // Fall through
+ default:
_ptr = _data + offs;
_pos = offs;
break;