diff --git a/src/GraphQLResponse.cpp b/src/GraphQLResponse.cpp index dacccef0..4036d628 100644 --- a/src/GraphQLResponse.cpp +++ b/src/GraphQLResponse.cpp @@ -896,47 +896,47 @@ IdType Value::release() } Value::Value(Type type /* = Type::Null */) + : _data { NullData {} } { switch (type) { case Type::Map: - _data = { MapData {} }; + _data = MapData {}; break; case Type::List: - _data = { ListType {} }; + _data = ListType {}; break; case Type::String: - _data = { StringData {} }; - break; - - case Type::Null: - _data = { NullData {} }; + _data = StringData {}; break; case Type::Boolean: - _data = { BooleanType { false } }; + _data = BooleanType { false }; break; case Type::Int: - _data = { IntType { 0 } }; + _data = IntType { 0 }; break; case Type::Float: - _data = { FloatType { 0.0 } }; + _data = FloatType { 0.0 }; break; case Type::EnumValue: - _data = { EnumData {} }; + _data = EnumData {}; break; case Type::ID: - _data = { IdType {} }; + _data = IdType {}; break; case Type::Scalar: - _data = { ScalarData {} }; + _data = ScalarData {}; + break; + + default: break; } }