From 7d6e466b68e5c86e32abc9c52181849c26b85c5d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 13 Apr 2020 01:43:00 -0400 Subject: [PATCH] CDecalManager: Make use of std::nullopt where applicable Same thing, less verbose. --- Runtime/Particle/CDecalManager.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Runtime/Particle/CDecalManager.cpp b/Runtime/Particle/CDecalManager.cpp index 831d5c6f7..19b94ec98 100644 --- a/Runtime/Particle/CDecalManager.cpp +++ b/Runtime/Particle/CDecalManager.cpp @@ -21,8 +21,9 @@ void CDecalManager::Initialize() { return; m_DecalPool.clear(); - for (int i = 0; i < 64; ++i) - m_DecalPool.emplace_back(std::optional{}, 0, i - 1, false); + for (int i = 0; i < 64; ++i) { + m_DecalPool.emplace_back(std::nullopt, 0, i - 1, false); + } m_FreeIndex = 63; m_PoolInitialized = true; @@ -39,8 +40,9 @@ void CDecalManager::Reinitialize() { Initialize(); m_DecalPool.clear(); - for (int i = 0; i < 64; ++i) - m_DecalPool.emplace_back(std::optional{}, 0, i - 1, false); + for (int i = 0; i < 64; ++i) { + m_DecalPool.emplace_back(std::nullopt, 0, i - 1, false); + } m_ActiveIndexList.clear();