From cb1970ebabe54ba17e9679b26597fed575d98ed6 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 12 Apr 2020 14:40:32 -0400 Subject: [PATCH] Switch to more compact form of output for bool. This also will hopefully deal with GCC's slightly confused claim that 'value' may be used without having been initialised down at #define OutputIntC (i.e. after it's out of scope, but I can sort of see why GCC might get confused while it remains in scope). --- Reflection/Struct.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Reflection/Struct.cpp b/Reflection/Struct.cpp index 5567172d8..723af2d9e 100644 --- a/Reflection/Struct.cpp +++ b/Reflection/Struct.cpp @@ -144,9 +144,7 @@ std::string Reflection::Struct::description() const { // Output Bools as yes/no. if(*type == typeid(bool)) { - bool value; - ::Reflection::get(*this, key, value); - stream << (value ? "true" : "false"); + stream << ::Reflection::get(*this, key); continue; }