Skip to content

Commit

Permalink
sdfljsd
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrinneal committed Aug 3, 2023
1 parent 1f50346 commit 7a1ee01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/pigeon/lib/cpp_generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1362,7 +1362,7 @@ ${prefix}reply(EncodableValue(std::move(wrapped)));''';
'const auto& $argName = std::get<${hostType.datatype}>($encodableArgName);');
} else if (hostType.isEnum) {
indent.writeln(
'const ${hostType.datatype}& $argName = (${hostType.datatype})$encodableArgName;');
'const ${hostType.datatype}& $argName = (${hostType.datatype})((int32_t)$encodableArgName);');
} else {
indent.writeln(
'const auto& $argName = std::any_cast<const ${hostType.datatype}&>(std::get<CustomEncodableValue>($encodableArgName));');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,8 @@ void HostIntegrationCoreApi::SetUp(flutter::BinaryMessenger* binary_messenger,
reply(WrapError("an_enum_arg unexpectedly null."));
return;
}
const AnEnum& an_enum_arg = (AnEnum)encodable_an_enum_arg;
const AnEnum& an_enum_arg =
(AnEnum)((int32_t)encodable_an_enum_arg);
ErrorOr<AnEnum> output = api->EchoEnum(an_enum_arg);
if (output.has_error()) {
reply(WrapError(output.error()));
Expand Down

0 comments on commit 7a1ee01

Please sign in to comment.