From 68b9d33d85d3b77937b0ef09e02ced251ab6aac4 Mon Sep 17 00:00:00 2001 From: Bill Avery Date: Tue, 24 Sep 2024 09:46:34 -0700 Subject: [PATCH] fix: cleanup extra blank lines --- samples/learn/schema/StarWarsSchema.cpp | 1 - samples/proxy/schema/ProxySchema.cpp | 1 - samples/today/nointrospection/TodaySchema.cpp | 1 - samples/today/schema/TodaySchema.cpp | 1 - samples/validation/schema/ValidationSchema.cpp | 2 -- src/SchemaGenerator.cpp | 3 +-- src/introspection/IntrospectionSchema.cpp | 2 -- 7 files changed, 1 insertion(+), 10 deletions(-) diff --git a/samples/learn/schema/StarWarsSchema.cpp b/samples/learn/schema/StarWarsSchema.cpp index 3813cab7..6e093b32 100644 --- a/samples/learn/schema/StarWarsSchema.cpp +++ b/samples/learn/schema/StarWarsSchema.cpp @@ -57,7 +57,6 @@ void AddTypesToSchema(const std::shared_ptr& schema) auto typeSubscription = schema::ObjectType::Make(R"gql(Subscription)gql"sv, R"md()md"sv); schema->AddType(R"gql(Subscription)gql"sv, typeSubscription); - static const auto s_namesEpisode = getEpisodeNames(); typeEpisode->AddEnumValues({ { s_namesEpisode[static_cast(learn::Episode::NEW_HOPE)], R"md()md"sv, std::nullopt }, diff --git a/samples/proxy/schema/ProxySchema.cpp b/samples/proxy/schema/ProxySchema.cpp index 6be2146e..5bb1337b 100644 --- a/samples/proxy/schema/ProxySchema.cpp +++ b/samples/proxy/schema/ProxySchema.cpp @@ -41,7 +41,6 @@ void AddTypesToSchema(const std::shared_ptr& schema) auto typeQueryResults = schema::ObjectType::Make(R"gql(QueryResults)gql"sv, R"md()md"sv); schema->AddType(R"gql(QueryResults)gql"sv, typeQueryResults); - static const auto s_namesOperationType = getOperationTypeNames(); typeOperationType->AddEnumValues({ { s_namesOperationType[static_cast(proxy::OperationType::QUERY)], R"md()md"sv, std::nullopt }, diff --git a/samples/today/nointrospection/TodaySchema.cpp b/samples/today/nointrospection/TodaySchema.cpp index 106258d5..98cf8f6d 100644 --- a/samples/today/nointrospection/TodaySchema.cpp +++ b/samples/today/nointrospection/TodaySchema.cpp @@ -97,7 +97,6 @@ void AddTypesToSchema(const std::shared_ptr& schema) auto typeExpensive = schema::ObjectType::Make(R"gql(Expensive)gql"sv, R"md()md"sv); schema->AddType(R"gql(Expensive)gql"sv, typeExpensive); - static const auto s_namesTaskState = getTaskStateNames(); typeTaskState->AddEnumValues({ { s_namesTaskState[static_cast(today::TaskState::Unassigned)], R"md()md"sv, std::make_optional(R"md(Need to deprecate an [enum value](https://spec.graphql.org/October2021/#sec-Schema-Introspection.Deprecation))md"sv) }, diff --git a/samples/today/schema/TodaySchema.cpp b/samples/today/schema/TodaySchema.cpp index b2395a64..7436b7fa 100644 --- a/samples/today/schema/TodaySchema.cpp +++ b/samples/today/schema/TodaySchema.cpp @@ -100,7 +100,6 @@ void AddTypesToSchema(const std::shared_ptr& schema) auto typeExpensive = schema::ObjectType::Make(R"gql(Expensive)gql"sv, R"md()md"sv); schema->AddType(R"gql(Expensive)gql"sv, typeExpensive); - static const auto s_namesTaskState = getTaskStateNames(); typeTaskState->AddEnumValues({ { s_namesTaskState[static_cast(today::TaskState::Unassigned)], R"md()md"sv, std::make_optional(R"md(Need to deprecate an [enum value](https://spec.graphql.org/October2021/#sec-Schema-Introspection.Deprecation))md"sv) }, diff --git a/samples/validation/schema/ValidationSchema.cpp b/samples/validation/schema/ValidationSchema.cpp index 463eccda..4a99aec5 100644 --- a/samples/validation/schema/ValidationSchema.cpp +++ b/samples/validation/schema/ValidationSchema.cpp @@ -79,14 +79,12 @@ void AddTypesToSchema(const std::shared_ptr& schema) auto typeArguments = schema::ObjectType::Make(R"gql(Arguments)gql"sv, R"md()md"sv); schema->AddType(R"gql(Arguments)gql"sv, typeArguments); - static const auto s_namesDogCommand = getDogCommandNames(); typeDogCommand->AddEnumValues({ { s_namesDogCommand[static_cast(validation::DogCommand::SIT)], R"md()md"sv, std::nullopt }, { s_namesDogCommand[static_cast(validation::DogCommand::DOWN)], R"md()md"sv, std::nullopt }, { s_namesDogCommand[static_cast(validation::DogCommand::HEEL)], R"md()md"sv, std::nullopt } }); - static const auto s_namesCatCommand = getCatCommandNames(); typeCatCommand->AddEnumValues({ { s_namesCatCommand[static_cast(validation::CatCommand::JUMP)], R"md()md"sv, std::nullopt } diff --git a/src/SchemaGenerator.cpp b/src/SchemaGenerator.cpp index 22eb1360..ccf5b518 100644 --- a/src/SchemaGenerator.cpp +++ b/src/SchemaGenerator.cpp @@ -2275,8 +2275,7 @@ Operations::Operations()cpp"; { bool firstValue = true; - sourceFile << R"cpp( - static const auto s_names)cpp" + sourceFile << R"cpp( static const auto s_names)cpp" << enumType.cppType << R"cpp( = get)cpp" << enumType.cppType << R"cpp(Names(); type)cpp" << enumType.cppType diff --git a/src/introspection/IntrospectionSchema.cpp b/src/introspection/IntrospectionSchema.cpp index 44b76262..5bc857ed 100644 --- a/src/introspection/IntrospectionSchema.cpp +++ b/src/introspection/IntrospectionSchema.cpp @@ -42,7 +42,6 @@ void AddTypesToSchema(const std::shared_ptr& schema) auto typeDirective = schema::ObjectType::Make(R"gql(__Directive)gql"sv, R"md()md"sv); schema->AddType(R"gql(__Directive)gql"sv, typeDirective); - static const auto s_namesTypeKind = getTypeKindNames(); typeTypeKind->AddEnumValues({ { s_namesTypeKind[static_cast(introspection::TypeKind::SCALAR)], R"md()md"sv, std::nullopt }, @@ -54,7 +53,6 @@ void AddTypesToSchema(const std::shared_ptr& schema) { s_namesTypeKind[static_cast(introspection::TypeKind::LIST)], R"md()md"sv, std::nullopt }, { s_namesTypeKind[static_cast(introspection::TypeKind::NON_NULL)], R"md()md"sv, std::nullopt } }); - static const auto s_namesDirectiveLocation = getDirectiveLocationNames(); typeDirectiveLocation->AddEnumValues({ { s_namesDirectiveLocation[static_cast(introspection::DirectiveLocation::QUERY)], R"md()md"sv, std::nullopt },