File tree Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Expand file tree Collapse file tree 2 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -69,12 +69,12 @@ struct [[nodiscard]] Operation
69
69
const peg::ast_node* operation;
70
70
std::string_view name;
71
71
std::string_view type;
72
- ResponseType responseType {} ;
73
- RequestVariableList variables {} ;
74
- internal::string_view_set inputTypeNames {} ;
75
- RequestInputTypeList referencedInputTypes {} ;
76
- internal::string_view_set enumNames {} ;
77
- RequestSchemaTypeList referencedEnums {} ;
72
+ ResponseType responseType;
73
+ RequestVariableList variables;
74
+ internal::string_view_set inputTypeNames;
75
+ RequestInputTypeList referencedInputTypes;
76
+ internal::string_view_set enumNames;
77
+ RequestSchemaTypeList referencedEnums;
78
78
};
79
79
80
80
using OperationList = std::vector<Operation>;
Original file line number Diff line number Diff line change @@ -727,7 +727,9 @@ void RequestLoader::findOperation()
727
727
728
728
if (!_requestOptions.operationName || name == *_requestOptions.operationName )
729
729
{
730
- _operations.emplace_back (&operationDefinition, name, operationType);
730
+ Operation operation { &operationDefinition, name, operationType };
731
+
732
+ _operations.push_back (std::move (operation));
731
733
732
734
if (_requestOptions.operationName )
733
735
{
@@ -781,8 +783,10 @@ void RequestLoader::findOperation()
781
783
message << " name: " << operation.name ;
782
784
}
783
785
784
- errors.emplace_back (message.str (),
785
- service::schema_location { position.line , position.column });
786
+ service::schema_error error { message.str (),
787
+ service::schema_location { position.line , position.column } };
788
+
789
+ errors.push_back (std::move (error));
786
790
787
791
continue ;
788
792
}
You can’t perform that action at this time.
0 commit comments