CLOUD: Add Missing Default Switch Cases

These are flagged by GCC if -Wswitch-default is enabled.
This commit is contained in:
D G Turner 2019-10-04 00:08:14 +01:00
parent 3cb6a84f03
commit f47a58ba64
2 changed files with 9 additions and 0 deletions

View file

@ -85,6 +85,8 @@ void CloudIcon::update() {
_lastUpdateTime = currentTime;
switch (_state) {
default:
// fallthrough intended
case kHidden:
return; // Nothing to do
case kShown:

View file

@ -58,6 +58,8 @@ Common::String CloudManager::getStorageConfigName(uint32 index) const {
case kStorageOneDriveId: return "OneDrive";
case kStorageGoogleDriveId: return "GoogleDrive";
case kStorageBoxId: return "Box";
default:
break;
}
assert(false); // Unhandled StorageID value
return "";
@ -79,6 +81,7 @@ void CloudManager::loadStorage() {
break;
default:
_activeStorage = nullptr;
break;
}
if (!_activeStorage) {
@ -271,6 +274,8 @@ void CloudManager::connectStorage(uint32 index, Common::String code, Networking:
case kStorageBoxId:
new Box::BoxStorage(code, cb);
break;
default:
break;
}
// in these constructors Storages request token using the passed code
// when the token is received, they call replaceStorage()
@ -296,6 +301,8 @@ void CloudManager::disconnectStorage(uint32 index) {
case kStorageBoxId:
Box::BoxStorage::removeFromConfig(kStoragePrefix + name + "_");
break;
default:
break;
}
switchStorage(kStorageNoneId);