Drawing selection and overlapping selections

This commit is contained in:
Krzosa Karol
2024-06-23 10:05:54 +02:00
parent 10afbd3e4f
commit b76d825f55
3 changed files with 64 additions and 18 deletions

View File

@@ -493,6 +493,14 @@ struct Array {
// @copy_paste array slice
T get_or_default(int64_t i, T default_value = {}) {
T result = default_value;
if (i >= 0 && i < len) {
result = data[i];
}
return result;
}
T pop() {
Assert(len > 0);
return data[--len];