-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[various] Enable permissive-
for Windows plugin examples
#8636
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
Changes from all commits
ac5ca00
2f9e5e0
8ef5c0c
ccedff3
6b8e55f
4352e07
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oof |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,18 +90,18 @@ ErrorOr<AllTypes> TestPlugin::EchoAllTypes(const AllTypes& everything) { | |
ErrorOr<std::optional<AllNullableTypes>> TestPlugin::EchoAllNullableTypes( | ||
const AllNullableTypes* everything) { | ||
if (!everything) { | ||
return std::nullopt; | ||
return std::optional<AllNullableTypes>(std::nullopt); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The changes in this file made me sad. I'm assuming the standard doesn't allow the two-level chaining of implicit conversions that this was relying on (foo -> optional -> ErrorOr<optional>), so this does one of them explicitly and then relies on the implicit construction of |
||
} | ||
return *everything; | ||
return std::optional<AllNullableTypes>(*everything); | ||
} | ||
|
||
ErrorOr<std::optional<AllNullableTypesWithoutRecursion>> | ||
TestPlugin::EchoAllNullableTypesWithoutRecursion( | ||
const AllNullableTypesWithoutRecursion* everything) { | ||
if (!everything) { | ||
return std::nullopt; | ||
return std::optional<AllNullableTypesWithoutRecursion>(std::nullopt); | ||
} | ||
return *everything; | ||
return std::optional<AllNullableTypesWithoutRecursion>(*everything); | ||
} | ||
|
||
ErrorOr<std::optional<flutter::EncodableValue>> TestPlugin::ThrowError() { | ||
|
@@ -288,193 +288,193 @@ TestPlugin::SendMultipleNullableTypesWithoutRecursion( | |
ErrorOr<std::optional<int64_t>> TestPlugin::EchoNullableInt( | ||
const int64_t* a_nullable_int) { | ||
if (!a_nullable_int) { | ||
return std::nullopt; | ||
return std::optional<int64_t>(std::nullopt); | ||
} | ||
return *a_nullable_int; | ||
return std::optional<int64_t>(*a_nullable_int); | ||
}; | ||
|
||
ErrorOr<std::optional<double>> TestPlugin::EchoNullableDouble( | ||
const double* a_nullable_double) { | ||
if (!a_nullable_double) { | ||
return std::nullopt; | ||
return std::optional<double>(std::nullopt); | ||
} | ||
return *a_nullable_double; | ||
return std::optional<double>(*a_nullable_double); | ||
}; | ||
|
||
ErrorOr<std::optional<bool>> TestPlugin::EchoNullableBool( | ||
const bool* a_nullable_bool) { | ||
if (!a_nullable_bool) { | ||
return std::nullopt; | ||
return std::optional<bool>(std::nullopt); | ||
} | ||
return *a_nullable_bool; | ||
return std::optional<bool>(*a_nullable_bool); | ||
}; | ||
|
||
ErrorOr<std::optional<std::string>> TestPlugin::EchoNullableString( | ||
const std::string* a_nullable_string) { | ||
if (!a_nullable_string) { | ||
return std::nullopt; | ||
return std::optional<std::string>(std::nullopt); | ||
} | ||
return *a_nullable_string; | ||
return std::optional<std::string>(*a_nullable_string); | ||
}; | ||
|
||
ErrorOr<std::optional<std::vector<uint8_t>>> TestPlugin::EchoNullableUint8List( | ||
const std::vector<uint8_t>* a_nullable_uint8_list) { | ||
if (!a_nullable_uint8_list) { | ||
return std::nullopt; | ||
return std::optional<std::vector<uint8_t>>(std::nullopt); | ||
} | ||
return *a_nullable_uint8_list; | ||
return std::optional<std::vector<uint8_t>>(*a_nullable_uint8_list); | ||
}; | ||
|
||
ErrorOr<std::optional<EncodableValue>> TestPlugin::EchoNullableObject( | ||
const EncodableValue* a_nullable_object) { | ||
if (!a_nullable_object) { | ||
return std::nullopt; | ||
return std::optional<EncodableValue>(std::nullopt); | ||
} | ||
return *a_nullable_object; | ||
return std::optional<EncodableValue>(*a_nullable_object); | ||
}; | ||
|
||
ErrorOr<std::optional<EncodableList>> TestPlugin::EchoNullableList( | ||
const EncodableList* a_nullable_list) { | ||
if (!a_nullable_list) { | ||
return std::nullopt; | ||
return std::optional<EncodableList>(std::nullopt); | ||
} | ||
return *a_nullable_list; | ||
return std::optional<EncodableList>(*a_nullable_list); | ||
}; | ||
|
||
ErrorOr<std::optional<EncodableList>> TestPlugin::EchoNullableEnumList( | ||
const EncodableList* enum_list) { | ||
if (!enum_list) { | ||
return std::nullopt; | ||
return std::optional<EncodableList>(std::nullopt); | ||
} | ||
return *enum_list; | ||
return std::optional<EncodableList>(*enum_list); | ||
}; | ||
|
||
ErrorOr<std::optional<EncodableList>> TestPlugin::EchoNullableClassList( | ||
const EncodableList* class_list) { | ||
if (!class_list) { | ||
return std::nullopt; | ||
return std::optional<EncodableList>(std::nullopt); | ||
} | ||
return *class_list; | ||
return std::optional<EncodableList>(*class_list); | ||
}; | ||
|
||
ErrorOr<std::optional<EncodableList>> TestPlugin::EchoNullableNonNullEnumList( | ||
const EncodableList* enum_list) { | ||
if (!enum_list) { | ||
return std::nullopt; | ||
return std::optional<EncodableList>(std::nullopt); | ||
} | ||
return *enum_list; | ||
return std::optional<EncodableList>(*enum_list); | ||
}; | ||
|
||
ErrorOr<std::optional<EncodableList>> TestPlugin::EchoNullableNonNullClassList( | ||
const EncodableList* class_list) { | ||
if (!class_list) { | ||
return std::nullopt; | ||
return std::optional<EncodableList>(std::nullopt); | ||
} | ||
return *class_list; | ||
return std::optional<EncodableList>(*class_list); | ||
}; | ||
|
||
ErrorOr<std::optional<EncodableMap>> TestPlugin::EchoNullableMap( | ||
const EncodableMap* map) { | ||
if (!map) { | ||
return std::nullopt; | ||
return std::optional<EncodableMap>(std::nullopt); | ||
} | ||
return *map; | ||
return std::optional<EncodableMap>(*map); | ||
}; | ||
|
||
ErrorOr<std::optional<EncodableMap>> TestPlugin::EchoNullableStringMap( | ||
const EncodableMap* string_map) { | ||
if (!string_map) { | ||
return std::nullopt; | ||
return std::optional<EncodableMap>(std::nullopt); | ||
} | ||
return *string_map; | ||
return std::optional<EncodableMap>(*string_map); | ||
}; | ||
|
||
ErrorOr<std::optional<EncodableMap>> TestPlugin::EchoNullableIntMap( | ||
const EncodableMap* int_map) { | ||
if (!int_map) { | ||
return std::nullopt; | ||
return std::optional<EncodableMap>(std::nullopt); | ||
} | ||
return *int_map; | ||
return std::optional<EncodableMap>(*int_map); | ||
}; | ||
|
||
ErrorOr<std::optional<EncodableMap>> TestPlugin::EchoNullableEnumMap( | ||
const EncodableMap* enum_map) { | ||
if (!enum_map) { | ||
return std::nullopt; | ||
return std::optional<EncodableMap>(std::nullopt); | ||
} | ||
return *enum_map; | ||
return std::optional<EncodableMap>(*enum_map); | ||
}; | ||
|
||
ErrorOr<std::optional<EncodableMap>> TestPlugin::EchoNullableClassMap( | ||
const EncodableMap* class_map) { | ||
if (!class_map) { | ||
return std::nullopt; | ||
return std::optional<EncodableMap>(std::nullopt); | ||
} | ||
return *class_map; | ||
return std::optional<EncodableMap>(*class_map); | ||
}; | ||
|
||
ErrorOr<std::optional<EncodableMap>> TestPlugin::EchoNullableNonNullStringMap( | ||
const EncodableMap* string_map) { | ||
if (!string_map) { | ||
return std::nullopt; | ||
return std::optional<EncodableMap>(std::nullopt); | ||
} | ||
return *string_map; | ||
return std::optional<EncodableMap>(*string_map); | ||
}; | ||
|
||
ErrorOr<std::optional<EncodableMap>> TestPlugin::EchoNullableNonNullIntMap( | ||
const EncodableMap* int_map) { | ||
if (!int_map) { | ||
return std::nullopt; | ||
return std::optional<EncodableMap>(std::nullopt); | ||
} | ||
return *int_map; | ||
return std::optional<EncodableMap>(*int_map); | ||
}; | ||
|
||
ErrorOr<std::optional<EncodableMap>> TestPlugin::EchoNullableNonNullEnumMap( | ||
const EncodableMap* enum_map) { | ||
if (!enum_map) { | ||
return std::nullopt; | ||
return std::optional<EncodableMap>(std::nullopt); | ||
} | ||
return *enum_map; | ||
return std::optional<EncodableMap>(*enum_map); | ||
}; | ||
|
||
ErrorOr<std::optional<EncodableMap>> TestPlugin::EchoNullableNonNullClassMap( | ||
const EncodableMap* class_map) { | ||
if (!class_map) { | ||
return std::nullopt; | ||
return std::optional<EncodableMap>(std::nullopt); | ||
} | ||
return *class_map; | ||
return std::optional<EncodableMap>(*class_map); | ||
}; | ||
|
||
ErrorOr<std::optional<AnEnum>> TestPlugin::EchoNullableEnum( | ||
const AnEnum* an_enum) { | ||
if (!an_enum) { | ||
return std::nullopt; | ||
return std::optional<AnEnum>(std::nullopt); | ||
} | ||
return *an_enum; | ||
return std::optional<AnEnum>(*an_enum); | ||
} | ||
|
||
ErrorOr<std::optional<AnotherEnum>> TestPlugin::EchoAnotherNullableEnum( | ||
const AnotherEnum* another_enum) { | ||
if (!another_enum) { | ||
return std::nullopt; | ||
return std::optional<AnotherEnum>(std::nullopt); | ||
} | ||
return *another_enum; | ||
return std::optional<AnotherEnum>(*another_enum); | ||
} | ||
|
||
ErrorOr<std::optional<int64_t>> TestPlugin::EchoOptionalNullableInt( | ||
const int64_t* a_nullable_int) { | ||
if (!a_nullable_int) { | ||
return std::nullopt; | ||
return std::optional<int64_t>(std::nullopt); | ||
} | ||
return *a_nullable_int; | ||
return std::optional<int64_t>(*a_nullable_int); | ||
} | ||
|
||
ErrorOr<std::optional<std::string>> TestPlugin::EchoNamedNullableString( | ||
const std::string* a_nullable_string) { | ||
if (!a_nullable_string) { | ||
return std::nullopt; | ||
return std::optional<std::string>(std::nullopt); | ||
} | ||
return *a_nullable_string; | ||
return std::optional<std::string>(*a_nullable_string); | ||
} | ||
|
||
void TestPlugin::NoopAsync( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the fixed issue link for the explanation for this.