CDecalManager: Make use of std::nullopt where applicable

Same thing, less verbose.
This commit is contained in:
Lioncash 2020-04-13 01:43:00 -04:00
parent 6fc32f44df
commit 7d6e466b68
1 changed files with 6 additions and 4 deletions

View File

@ -21,8 +21,9 @@ void CDecalManager::Initialize() {
return; return;
m_DecalPool.clear(); m_DecalPool.clear();
for (int i = 0; i < 64; ++i) for (int i = 0; i < 64; ++i) {
m_DecalPool.emplace_back(std::optional<CDecal>{}, 0, i - 1, false); m_DecalPool.emplace_back(std::nullopt, 0, i - 1, false);
}
m_FreeIndex = 63; m_FreeIndex = 63;
m_PoolInitialized = true; m_PoolInitialized = true;
@ -39,8 +40,9 @@ void CDecalManager::Reinitialize() {
Initialize(); Initialize();
m_DecalPool.clear(); m_DecalPool.clear();
for (int i = 0; i < 64; ++i) for (int i = 0; i < 64; ++i) {
m_DecalPool.emplace_back(std::optional<CDecal>{}, 0, i - 1, false); m_DecalPool.emplace_back(std::nullopt, 0, i - 1, false);
}
m_ActiveIndexList.clear(); m_ActiveIndexList.clear();