This commit is contained in:
gingerBill
2024-06-05 15:43:15 +01:00
parent c406bbb6e3
commit cbabcb0907
3 changed files with 34 additions and 2 deletions

View File

@@ -457,6 +457,15 @@ gb_internal Selection sub_selection(Selection const &sel, isize offset) {
return res;
}
gb_internal Selection trim_selection(Selection const &sel) {
Selection res = {};
res.index.data = sel.index.data;
res.index.count = gb_max(sel.index.count - 1, 0);
res.index.capacity = res.index.count;
return res;
}
gb_global Type basic_types[] = {
{Type_Basic, {Basic_Invalid, 0, 0, STR_LIT("invalid type")}},