Skip to content

Commit 5e389f6

Browse files
committed
Explicitly construct an ast_input for make_shared
1 parent 3725ddc commit 5e389f6

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/SyntaxTree.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,9 @@ struct [[nodiscard]] ast_input
10201020

10211021
ast parseSchemaString(std::string_view input, size_t depthLimit)
10221022
{
1023-
ast result { std::make_shared<ast_input>(ast_string { { input.cbegin(), input.cend() } }), {} };
1023+
ast result { std::make_shared<ast_input>(
1024+
ast_input { ast_string { { input.cbegin(), input.cend() } } }),
1025+
{} };
10241026
auto& data = std::get<ast_string>(result.input->data);
10251027

10261028
try
@@ -1081,7 +1083,9 @@ ast parseSchemaFile(std::string_view filename, size_t depthLimit)
10811083

10821084
ast parseString(std::string_view input, size_t depthLimit)
10831085
{
1084-
ast result { std::make_shared<ast_input>(ast_string { { input.cbegin(), input.cend() } }), {} };
1086+
ast result { std::make_shared<ast_input>(
1087+
ast_input { ast_string { { input.cbegin(), input.cend() } } }),
1088+
{} };
10851089
auto& data = std::get<ast_string>(result.input->data);
10861090

10871091
try
@@ -1146,7 +1150,8 @@ ast parseFile(std::string_view filename, size_t depthLimit)
11461150

11471151
peg::ast operator"" _graphql(const char* text, size_t size)
11481152
{
1149-
peg::ast result { std::make_shared<peg::ast_input>(peg::ast_string_view { { text, size } }),
1153+
peg::ast result { std::make_shared<peg::ast_input>(
1154+
peg::ast_input { peg::ast_string_view { { text, size } } }),
11501155
{} };
11511156
auto& data = std::get<peg::ast_string_view>(result.input->data);
11521157

0 commit comments

Comments
 (0)