Skip to content

Fix some code analysis issues detected by VS 2022 #187

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions samples/learn/schema/StarWarsSchema.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ enum class Episode

struct ReviewInput
{
int stars;
std::optional<std::string> commentary;
int stars {};
std::optional<std::string> commentary {};
};

namespace object {
Expand Down
22 changes: 11 additions & 11 deletions samples/today/nointrospection/TodaySchema.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,33 @@ enum class TaskState

struct CompleteTaskInput
{
response::IdType id;
std::optional<TaskState> testTaskState;
std::optional<bool> isComplete;
std::optional<std::string> clientMutationId;
response::IdType id {};
std::optional<TaskState> testTaskState {};
std::optional<bool> isComplete {};
std::optional<std::string> clientMutationId {};
};

struct ThirdNestedInput
{
response::IdType id;
response::IdType id {};
};

struct FourthNestedInput
{
response::IdType id;
response::IdType id {};
};

struct SecondNestedInput
{
response::IdType id;
ThirdNestedInput third;
response::IdType id {};
ThirdNestedInput third {};
};

struct FirstNestedInput
{
response::IdType id;
SecondNestedInput second;
ThirdNestedInput third;
response::IdType id {};
SecondNestedInput second {};
ThirdNestedInput third {};
};

namespace object {
Expand Down
22 changes: 11 additions & 11 deletions samples/today/schema/TodaySchema.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,33 @@ enum class TaskState

struct CompleteTaskInput
{
response::IdType id;
std::optional<TaskState> testTaskState;
std::optional<bool> isComplete;
std::optional<std::string> clientMutationId;
response::IdType id {};
std::optional<TaskState> testTaskState {};
std::optional<bool> isComplete {};
std::optional<std::string> clientMutationId {};
};

struct ThirdNestedInput
{
response::IdType id;
response::IdType id {};
};

struct FourthNestedInput
{
response::IdType id;
response::IdType id {};
};

struct SecondNestedInput
{
response::IdType id;
ThirdNestedInput third;
response::IdType id {};
ThirdNestedInput third {};
};

struct FirstNestedInput
{
response::IdType id;
SecondNestedInput second;
ThirdNestedInput third;
response::IdType id {};
SecondNestedInput second {};
ThirdNestedInput third {};
};

namespace object {
Expand Down
4 changes: 2 additions & 2 deletions samples/validation/schema/ValidationSchema.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ enum class CatCommand

struct ComplexInput
{
std::optional<std::string> name;
std::optional<std::string> owner;
std::optional<std::string> name {};
std::optional<std::string> owner {};
};

namespace object {
Expand Down
Loading