CLOUD: Add Missing Default Switch Cases
These are flagged by GCC if -Wswitch-default is enabled.
This commit is contained in:
parent
3cb6a84f03
commit
f47a58ba64
2 changed files with 9 additions and 0 deletions
|
@ -85,6 +85,8 @@ void CloudIcon::update() {
|
||||||
_lastUpdateTime = currentTime;
|
_lastUpdateTime = currentTime;
|
||||||
|
|
||||||
switch (_state) {
|
switch (_state) {
|
||||||
|
default:
|
||||||
|
// fallthrough intended
|
||||||
case kHidden:
|
case kHidden:
|
||||||
return; // Nothing to do
|
return; // Nothing to do
|
||||||
case kShown:
|
case kShown:
|
||||||
|
|
|
@ -58,6 +58,8 @@ Common::String CloudManager::getStorageConfigName(uint32 index) const {
|
||||||
case kStorageOneDriveId: return "OneDrive";
|
case kStorageOneDriveId: return "OneDrive";
|
||||||
case kStorageGoogleDriveId: return "GoogleDrive";
|
case kStorageGoogleDriveId: return "GoogleDrive";
|
||||||
case kStorageBoxId: return "Box";
|
case kStorageBoxId: return "Box";
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
assert(false); // Unhandled StorageID value
|
assert(false); // Unhandled StorageID value
|
||||||
return "";
|
return "";
|
||||||
|
@ -79,6 +81,7 @@ void CloudManager::loadStorage() {
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
_activeStorage = nullptr;
|
_activeStorage = nullptr;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_activeStorage) {
|
if (!_activeStorage) {
|
||||||
|
@ -271,6 +274,8 @@ void CloudManager::connectStorage(uint32 index, Common::String code, Networking:
|
||||||
case kStorageBoxId:
|
case kStorageBoxId:
|
||||||
new Box::BoxStorage(code, cb);
|
new Box::BoxStorage(code, cb);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
// in these constructors Storages request token using the passed code
|
// in these constructors Storages request token using the passed code
|
||||||
// when the token is received, they call replaceStorage()
|
// when the token is received, they call replaceStorage()
|
||||||
|
@ -296,6 +301,8 @@ void CloudManager::disconnectStorage(uint32 index) {
|
||||||
case kStorageBoxId:
|
case kStorageBoxId:
|
||||||
Box::BoxStorage::removeFromConfig(kStoragePrefix + name + "_");
|
Box::BoxStorage::removeFromConfig(kStoragePrefix + name + "_");
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
switchStorage(kStorageNoneId);
|
switchStorage(kStorageNoneId);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue