Skip to content

Commit

Permalink
Do not construct a temporary TypeData
Browse files Browse the repository at this point in the history
  • Loading branch information
wravery committed Jul 19, 2024
1 parent 1fdcae6 commit 25604bd
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/GraphQLResponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,39 +901,39 @@ Value::Value(Type type /* = Type::Null */)
switch (type)
{
case Type::Map:
_data = { MapData {} };
_data = MapData {};
break;

case Type::List:
_data = { ListType {} };
_data = ListType {};
break;

case Type::String:
_data = { StringData {} };
_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:
Expand Down

0 comments on commit 25604bd

Please sign in to comment.