@@ -1441,10 +1441,25 @@ void Result<)cpp" << _loader.getSchemaNamespace()
14411441)cpp" ;
14421442 }
14431443
1444+ const bool shouldMove = SchemaLoader::shouldMoveInputField (inputField);
1445+
14441446 firstField = false ;
14451447 fieldName[0 ] =
14461448 static_cast <char >(std::toupper (static_cast <unsigned char >(fieldName[0 ])));
1447- sourceFile << R"cpp( std::move(value)cpp" << fieldName << R"cpp( ))cpp" ;
1449+
1450+ sourceFile << R"cpp( )cpp" ;
1451+
1452+ if (shouldMove)
1453+ {
1454+ sourceFile << R"cpp( std::move()cpp" ;
1455+ }
1456+
1457+ sourceFile << R"cpp( value)cpp" << fieldName;
1458+
1459+ if (shouldMove)
1460+ {
1461+ sourceFile << R"cpp( ))cpp" ;
1462+ }
14481463 }
14491464
14501465 sourceFile << R"cpp(
@@ -2396,7 +2411,8 @@ service::AwaitableResolver )cpp"
23962411
23972412 if (!_loader.isIntrospection ())
23982413 {
2399- sourceFile << R"cpp( service::SelectionSetParams selectionSetParams { static_cast<const service::SelectionSetParams&>(params) };
2414+ sourceFile
2415+ << R"cpp( service::SelectionSetParams selectionSetParams { static_cast<const service::SelectionSetParams&>(params) };
24002416 auto directives = std::move(params.fieldDirectives);
24012417)cpp" ;
24022418 }
@@ -2775,8 +2791,23 @@ std::string Generator::getArgumentDeclaration(const InputField& argument, const
27752791 << argument.name << R"cpp( ", )cpp" << argumentsToken << R"cpp( );
27762792 auto )cpp" << prefixToken
27772793 << argumentName << R"cpp( = (pair)cpp" << argumentName << R"cpp( .second
2778- ? std::move(pair)cpp"
2779- << argumentName << R"cpp( .first)
2794+ ? )cpp" ;
2795+
2796+ const bool shouldMove = SchemaLoader::shouldMoveInputField (argument);
2797+
2798+ if (shouldMove)
2799+ {
2800+ argumentDeclaration << R"cpp( std::move()cpp" ;
2801+ }
2802+
2803+ argumentDeclaration << R"cpp( pair)cpp" << argumentName << R"cpp( .first)cpp" ;
2804+
2805+ if (shouldMove)
2806+ {
2807+ argumentDeclaration << R"cpp( ))cpp" ;
2808+ }
2809+
2810+ argumentDeclaration << R"cpp(
27802811 : )cpp" << getArgumentAccessType (argument)
27812812 << R"cpp( ::require)cpp" << getTypeModifiers (argument.modifiers )
27822813 << R"cpp( (")cpp" << argument.name << R"cpp( ", )cpp" << defaultToken
0 commit comments