mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Remove redundant elses
This commit is contained in:
parent
15162a734d
commit
37dc1a6a76
1 changed files with 5 additions and 9 deletions
|
@ -73,9 +73,8 @@ namespace ESM
|
||||||
case State::Closed:
|
case State::Closed:
|
||||||
if (indexIt->second->mName)
|
if (indexIt->second->mName)
|
||||||
return *indexIt->second->mName;
|
return *indexIt->second->mName;
|
||||||
else
|
throw std::logic_error(
|
||||||
throw std::logic_error(
|
"ESMReader at index " + std::to_string(index) + " has forgotten its filename");
|
||||||
"ESMReader at index " + std::to_string(index) + " has forgotten its filename");
|
|
||||||
default:
|
default:
|
||||||
throw std::logic_error("ESMReader at index " + std::to_string(index) + " in unknown state");
|
throw std::logic_error("ESMReader at index " + std::to_string(index) + " in unknown state");
|
||||||
}
|
}
|
||||||
|
@ -95,15 +94,12 @@ namespace ESM
|
||||||
case State::Free:
|
case State::Free:
|
||||||
if (!indexIt->second->mReader.getName().empty())
|
if (!indexIt->second->mReader.getName().empty())
|
||||||
return indexIt->second->mReader.getFileSize();
|
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:
|
case State::Closed:
|
||||||
if (indexIt->second->mFileSize)
|
if (indexIt->second->mFileSize)
|
||||||
return *indexIt->second->mFileSize;
|
return *indexIt->second->mFileSize;
|
||||||
else
|
throw std::logic_error(
|
||||||
throw std::logic_error(
|
"ESMReader at index " + std::to_string(index) + " has forgotten its file size");
|
||||||
"ESMReader at index " + std::to_string(index) + " has forgotten its file size");
|
|
||||||
default:
|
default:
|
||||||
throw std::logic_error("ESMReader at index " + std::to_string(index) + " in unknown state");
|
throw std::logic_error("ESMReader at index " + std::to_string(index) + " in unknown state");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue