Skip to content

Commit

Permalink
Probably aint it
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrinneal committed Apr 2, 2024
1 parent 6b224fe commit 3969c7a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 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 @@ -800,7 +800,7 @@ class CppSourceGenerator extends StructuredGenerator<CppOptions> {
return '(${field.type.baseName})(std::get<int32_t>($encodable))';
} else if (field.type.baseName == 'int') {
return '$encodable.LongValue()';
} else if (field.type.baseName == 'Object') {
} else if (field.type.isClass || field.type.baseName == 'Object') {
return encodable;
} else {
final HostDatatype hostDatatype =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,8 +689,7 @@ AllNullableTypes AllNullableTypes::FromEncodableList(
}
auto& encodable_all_nullable_types = list[16];
if (!encodable_all_nullable_types.IsNull()) {
decoded.set_all_nullable_types(
std::get<AllNullableTypes>(encodable_all_nullable_types));
decoded.set_all_nullable_types(encodable_all_nullable_types);
}
return decoded;
}
Expand Down Expand Up @@ -1236,16 +1235,15 @@ EncodableList AllClassesWrapper::ToEncodableList() const {

AllClassesWrapper AllClassesWrapper::FromEncodableList(
const EncodableList& list) {
AllClassesWrapper decoded(std::get<AllNullableTypes>(list[0]));
AllClassesWrapper decoded(list[0]);
auto& encodable_all_nullable_types_without_recursion = list[1];
if (!encodable_all_nullable_types_without_recursion.IsNull()) {
decoded.set_all_nullable_types_without_recursion(
std::get<AllNullableTypesWithoutRecursion>(
encodable_all_nullable_types_without_recursion));
encodable_all_nullable_types_without_recursion);
}
auto& encodable_all_types = list[2];
if (!encodable_all_types.IsNull()) {
decoded.set_all_types(std::get<AllTypes>(encodable_all_types));
decoded.set_all_types(encodable_all_types);
}
return decoded;
}
Expand Down

0 comments on commit 3969c7a

Please sign in to comment.