Remove redundant elses

This commit is contained in:
AnyOldName3 2025-04-10 16:51:23 +01:00
parent 15162a734d
commit 37dc1a6a76

View file

@ -73,7 +73,6 @@ namespace ESM
case State::Closed:
if (indexIt->second->mName)
return *indexIt->second->mName;
else
throw std::logic_error(
"ESMReader at index " + std::to_string(index) + " has forgotten its filename");
default:
@ -95,13 +94,10 @@ namespace ESM
case State::Free:
if (!indexIt->second->mReader.getName().empty())
return indexIt->second->mReader.getFileSize();
else
throw std::logic_error(
"ESMReader at index " + std::to_string(index) + " has not been opened yet");
throw std::logic_error("ESMReader at index " + std::to_string(index) + " has not been opened yet");
case State::Closed:
if (indexIt->second->mFileSize)
return *indexIt->second->mFileSize;
else
throw std::logic_error(
"ESMReader at index " + std::to_string(index) + " has forgotten its file size");
default: