We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
rbs_loc_add_required_child
1 parent 1444a23 commit 7bda0bfCopy full SHA for 7bda0bf
ext/rbs_extension/location.c
@@ -57,15 +57,10 @@ static void check_children_cap(rbs_loc *loc) {
57
}
58
59
void rbs_loc_add_required_child(rbs_loc *loc, ID name, range r) {
60
- check_children_cap(loc);
61
-
62
- unsigned short i = loc->children->len++;
63
- loc->children->entries[i] = (rbs_loc_entry) {
64
- .name = name,
65
- .rg = rbs_new_loc_range(r),
66
- };
+ rbs_loc_add_optional_child(loc, name, r);
67
68
- loc->children->required_p |= 1 << i;
+ unsigned short last_index = loc->children->len - 1;
+ loc->children->required_p |= 1 << last_index;
69
70
71
void rbs_loc_add_optional_child(rbs_loc *loc, ID name, range r) {
0 commit comments