core: object: remove legacy iterator interface usage
This commit is contained in:
@@ -47,16 +47,18 @@ b_result b_class_instantiate(
|
||||
out->c_magic = B_CLASS_MAGIC;
|
||||
out->c_type = type;
|
||||
|
||||
b_queue_iterator q_it;
|
||||
b_queue_foreach (&q_it, &type->r_class_hierarchy) {
|
||||
struct b_queue_entry *entry = b_queue_first(&type->r_class_hierarchy);
|
||||
while (entry) {
|
||||
struct b_type_component *comp
|
||||
= b_unbox(struct b_type_component, q_it.entry, c_entry);
|
||||
= b_unbox(struct b_type_component, entry, c_entry);
|
||||
const struct b_type_info *class_info = comp->c_type->r_info;
|
||||
void *class_data = (char *)out + comp->c_class_data_offset;
|
||||
|
||||
if (class_info->t_class_init) {
|
||||
class_info->t_class_init(out, class_data);
|
||||
}
|
||||
|
||||
entry = b_queue_next(entry);
|
||||
}
|
||||
|
||||
*out_class = out;
|
||||
|
||||
Reference in New Issue
Block a user