Simplify conditional.

Co-authored-by: Renxuan Wang <renxuan@apple.com>
This commit is contained in:
Steve Atherton 2022-03-29 23:43:07 -07:00 committed by GitHub
parent b50886b10a
commit a1eca85b66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -755,10 +755,8 @@ inline Reference<IBackupContainer> Codec<Reference<IBackupContainer>>::unpack(Tu
}
Optional<std::string> proxy;
if (val.size() > 2) {
if (!val.getString(2).empty()) {
proxy = val.getString(2).toString();
};
if (val.size() > 2 && !val.getString(2).empty()) {
proxy = val.getString(2).toString();
}
return IBackupContainer::openContainer(url, proxy, encryptionKeyFileName);