From 843e000b745f90a3f69a3f46c4677997080fb9e5 Mon Sep 17 00:00:00 2001 From: John Jones Date: Mon, 25 Mar 2019 08:25:43 -0500 Subject: [PATCH] value initialize result --- include/fc/static_variant.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/fc/static_variant.hpp b/include/fc/static_variant.hpp index 0fa2a7b..4a440a2 100644 --- a/include/fc/static_variant.hpp +++ b/include/fc/static_variant.hpp @@ -226,7 +226,7 @@ template static const fc::array init_wrappers( Visitor& v, Data d, typename Visitor::result_type(**funcs)(Visitor&,Data) = 0 ) { - fc::array result; + fc::array result{}; if( !funcs ) funcs = result.begin(); *funcs++ = [] ( Visitor& v, Data d ) { return v( *reinterpret_cast( d ) ); }; init_wrappers( v, d, funcs ); @@ -244,7 +244,7 @@ template static const fc::array init_const_wrappers( Visitor& v, Data d, typename Visitor::result_type(**funcs)(Visitor&,Data) = 0 ) { - fc::array result; + fc::array result{}; if( !funcs ) funcs = result.begin(); *funcs++ = [] ( Visitor& v, Data d ) { return v( *reinterpret_cast( d ) ); }; init_const_wrappers( v, d, funcs );