Skip to content

Commit c53afe9

Browse files
committed
Fix #39, plus a lingering short-string-optimization bug
1 parent 20b3c5a commit c53afe9

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

GraphQLService.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,10 +1082,7 @@ std::future<response::Value> Object::resolve(const SelectionSetParams & selectio
10821082

10831083
response::Value result(response::Type::Map);
10841084

1085-
if (data.size() > 0)
1086-
{
1087-
result.emplace_back(strData, std::move(data));
1088-
}
1085+
result.emplace_back(strData, std::move(data));
10891086

10901087
if (errors.size() > 0)
10911088
{

include/graphqlservice/GraphQLService.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -541,10 +541,7 @@ struct ModifiedResult
541541

542542
response::Value document(response::Type::Map);
543543

544-
if (data.size() > 0)
545-
{
546-
document.emplace_back(strData, std::move(data));
547-
}
544+
document.emplace_back(strData, std::move(data));
548545

549546
if (errors.size() > 0)
550547
{

0 commit comments

Comments
 (0)