From 2c464c3ee0dc79775d77c32780b8cc2e9212c833 Mon Sep 17 00:00:00 2001 From: santorac <55155825+santorac@users.noreply.github.com> Date: Wed, 15 Sep 2021 11:35:09 -0700 Subject: [PATCH] Updated the ScopedValue constructor per code review feedback. Signed-off-by: santorac <55155825+santorac@users.noreply.github.com> --- Code/Framework/AtomCore/AtomCore/Utils/ScopedValue.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Code/Framework/AtomCore/AtomCore/Utils/ScopedValue.h b/Code/Framework/AtomCore/AtomCore/Utils/ScopedValue.h index 8cb985cffe..f6ed6d6df4 100644 --- a/Code/Framework/AtomCore/AtomCore/Utils/ScopedValue.h +++ b/Code/Framework/AtomCore/AtomCore/Utils/ScopedValue.h @@ -20,11 +20,11 @@ namespace AZ T m_finalValue; public: - ScopedValue(T* ptr, T initialValue, T finalValue) + ScopedValue(T* ptr, T initialValue, T finalValue) : + m_ptr(ptr), m_finalValue(finalValue) { - m_ptr = ptr; + AZ_Assert(m_ptr, "ScopedValue::m_ptr is null"); *m_ptr = initialValue; - m_finalValue = finalValue; } ~ScopedValue()