| 70 | } |
| 71 | |
| 72 | void skip_struct_data(ReadContext &ctx, const TypeInfo &type_info) { |
| 73 | if (!type_info.type_meta) { |
| 74 | ctx.set_error(Error::type_error("TypeMeta not found for struct skip")); |
| 75 | return; |
| 76 | } |
| 77 | if (ctx.check_struct_version()) { |
| 78 | (void)ctx.read_int32(ctx.error()); |
| 79 | if (FORY_PREDICT_FALSE(ctx.has_error())) { |
| 80 | return; |
| 81 | } |
| 82 | } |
| 83 | const auto &field_infos = type_info.type_meta->get_field_infos(); |
| 84 | for (const auto &fi : field_infos) { |
| 85 | skip_field_value(ctx, fi.field_type, fi.field_type.ref_mode); |
| 86 | if (FORY_PREDICT_FALSE(ctx.has_error())) { |
| 87 | return; |
| 88 | } |
| 89 | } |
| 90 | } |
| 91 | |
| 92 | void skip_ext_data(ReadContext &ctx, const TypeInfo &type_info) { |
| 93 | if (!type_info.harness.valid() || !type_info.harness.read_data_fn) { |
no test coverage detected