From 3938da9cc694956de39c832cc31fcd8a64796895 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Fri, 28 Jun 2019 12:39:15 -0300 Subject: [PATCH] Fix compiler warnings about Optional field initialization order --- src/common/Optional.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/common/Optional.h b/src/common/Optional.h index adab488dd..e1eb00aad 100644 --- a/src/common/Optional.h +++ b/src/common/Optional.h @@ -31,19 +31,19 @@ struct Optional bool hasValue; Optional() - : hasValue(false) - , value(T()) + : value(T()) + , hasValue(false) {} Optional(T val) - : hasValue(true) - , value(val) + : value(val) + , hasValue(true) {} void set(T val) { - hasValue = true; value = val; + hasValue = true; } };