[Scummvm-git-logs] scummvm master -> 0eec560cace96acff1450db26b7f914ff6703109
digitall
547637+digitall at users.noreply.github.com
Thu Oct 3 02:04:11 CEST 2019
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
0eec560cac COMMON: Add Missing Switch Default Cases to Stream Seek Methods
Commit: 0eec560cace96acff1450db26b7f914ff6703109
https://github.com/scummvm/scummvm/commit/0eec560cace96acff1450db26b7f914ff6703109
Author: D G Turner (digitall at scummvm.org)
Date: 2019-10-03T01:01:16+01:00
Commit Message:
COMMON: Add Missing Switch Default Cases to Stream Seek Methods
These are flagged by GCC if -Wswitch-default is enabled.
Changed paths:
common/stream.cpp
diff --git a/common/stream.cpp b/common/stream.cpp
index 9bd0938..d401947 100644
--- a/common/stream.cpp
+++ b/common/stream.cpp
@@ -85,6 +85,8 @@ bool MemoryReadStream::seek(int32 offs, int whence) {
offs = _size + offs;
// Fall through
case SEEK_SET:
+ // Fall through
+ default:
_ptr = _ptrOrig + offs;
_pos = offs;
break;
@@ -188,8 +190,6 @@ String SeekableReadStream::readLine() {
return line;
}
-
-
uint32 SubReadStream::read(void *dataPtr, uint32 dataSize) {
if (dataSize > _end - _pos) {
dataSize = _end - _pos;
@@ -221,6 +221,8 @@ bool SeekableSubReadStream::seek(int32 offset, int whence) {
offset = size() + offset;
// fallthrough
case SEEK_SET:
+ // Fall through
+ default:
_pos = _begin + offset;
break;
case SEEK_CUR:
More information about the Scummvm-git-logs
mailing list