mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
grid: refactor: remove union range_data_for_insertion
This union is identical to row_range_data, except the URI char pointer is const. Let's ignore that, and re-use row_range_data, casting the URI pointer when necessary. Also remove uri_range_insert() and curly_range_insert(), and use the generic version of range_insert() everywhere.
This commit is contained in:
parent
6a0110446c
commit
45f4eb48fb
2 changed files with 33 additions and 51 deletions
10
terminal.h
10
terminal.h
|
|
@ -129,8 +129,14 @@ struct row_range {
|
|||
int end;
|
||||
|
||||
union {
|
||||
struct uri_range_data uri;
|
||||
struct curly_range_data curly;
|
||||
/* This is just an expanded union row_range_data, but
|
||||
* anonymous, so that we don't have to write range->u.uri.id,
|
||||
* but can instead do range->uri.id */
|
||||
union {
|
||||
struct uri_range_data uri;
|
||||
struct curly_range_data curly;
|
||||
};
|
||||
union row_range_data data;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue