From 305ac0907726ee98e233bf0a9d8e12a6af162497 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Fri, 7 Dec 2018 14:14:26 +0100 Subject: [PATCH] Small optimization in Lazy class. --- include/MUtils/Lazy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/MUtils/Lazy.h b/include/MUtils/Lazy.h index a0031c4..267b751 100644 --- a/include/MUtils/Lazy.h +++ b/include/MUtils/Lazy.h @@ -53,7 +53,7 @@ namespace MUtils T& operator*(void) { T *value; - while (!(value = m_value.fetchAndAddOrdered(0))) + while (!(value = m_value)) { if (!(value = m_initializer())) {