diff options
| author | Jonathan Bradley <jcb@pikum.xyz> | 2025-07-17 14:50:05 -0400 |
|---|---|---|
| committer | Jonathan Bradley <jcb@pikum.xyz> | 2025-07-17 14:50:05 -0400 |
| commit | 8fbeadda53243b701957a26dba1113d84ad5c7c4 (patch) | |
| tree | d37007379260bd8e6ec2a9c24ff269a8b5875dff /src/static-ui.cpp | |
| parent | f50804900157af65da50166325163444a78aaaec (diff) | |
pke: handle pk.h breaking changes
Diffstat (limited to 'src/static-ui.cpp')
| -rw-r--r-- | src/static-ui.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/static-ui.cpp b/src/static-ui.cpp index 68fd551..1abd6b2 100644 --- a/src/static-ui.cpp +++ b/src/static-ui.cpp @@ -38,7 +38,7 @@ struct pke_ui_master { void pke_ui_init() { pke_ui_master.bkt = pk_mem_bucket_create("pke ui", PK_MEM_DEFAULT_BUCKET_SIZE, PK_MEMBUCKET_FLAG_NONE); - pke_ui_master.root_boxes = pk_new<pke_ui_box*>(1, pke_ui_master.bkt); + pke_ui_master.root_boxes = pk_new_arr<pke_ui_box*>(1, pke_ui_master.bkt); pke_ui_master.h_root_boxes = 0; pke_ui_master.r_root_boxes = 1; pke_ui_master.bindings = {}; @@ -399,7 +399,7 @@ void pke_ui_teardown_box_recursive(pke_ui_box *box) { pke_ui_teardown_box_recursive(box->internal.children[i]); } if (box->internal.children != nullptr) { - pk_delete<pke_ui_box *>(box->internal.children, box->internal.r_children); + pk_delete_arr<pke_ui_box *>(box->internal.children, box->internal.r_children); } } @@ -407,7 +407,7 @@ void pke_ui_teardown() { for (pke_ui_box_count_T i = 0; i < pke_ui_master.h_root_boxes; ++i) { pke_ui_teardown_box_recursive(pke_ui_master.root_boxes[i]); } - pk_delete<pke_ui_box *>(pke_ui_master.root_boxes, pke_ui_master.r_root_boxes, pke_ui_master.bkt); + pk_delete_arr<pke_ui_box *>(pke_ui_master.root_boxes, pke_ui_master.r_root_boxes, pke_ui_master.bkt); pk_mem_bucket_destroy(pke_ui_master.bkt); pke_ui_master.bkt = nullptr; pke_ui_master.root_boxes = nullptr; @@ -480,11 +480,11 @@ pke_ui_box *pke_ui_box_new_root(const PKE_UI_BOX_TYPE type, pk_uuid uuid) { if (pke_ui_master.h_root_boxes == pke_ui_master.r_root_boxes) { pke_ui_box_count_T prev_r_root_boxes = pke_ui_master.r_root_boxes; pke_ui_master.r_root_boxes *= 1.5; - pke_ui_box **boxes = pk_new<pke_ui_box*>(pke_ui_master.r_root_boxes); + pke_ui_box **boxes = pk_new_arr<pke_ui_box*>(pke_ui_master.r_root_boxes); for (pke_ui_box_count_T i = 0; i < pke_ui_master.h_root_boxes; ++i) { boxes[i] = pke_ui_master.root_boxes[i]; } - if (pke_ui_master.root_boxes != nullptr) pk_delete<pke_ui_box*>(pke_ui_master.root_boxes, prev_r_root_boxes); + if (pke_ui_master.root_boxes != nullptr) pk_delete_arr<pke_ui_box*>(pke_ui_master.root_boxes, prev_r_root_boxes); pke_ui_master.root_boxes = boxes; } pke_ui_box *box = pk_new<pke_ui_box>(pke_ui_master.bkt); @@ -512,12 +512,12 @@ pke_ui_box *pke_ui_box_new_child(pke_ui_box *parent, const PKE_UI_BOX_TYPE type, if (parent->internal.h_children == parent->internal.r_children) { pke_ui_box_count_T prev_r_children = parent->internal.r_children; parent->internal.r_children = PK_MAX(parent->internal.r_children * 1.5, 2); - pke_ui_box **boxes = pk_new<pke_ui_box*>(parent->internal.r_children); + pke_ui_box **boxes = pk_new_arr<pke_ui_box*>(parent->internal.r_children); for (pke_ui_box_count_T i = 0; i < parent->internal.h_children; ++i) { boxes[i] = parent->internal.children[i]; } if (parent->internal.children != nullptr) { - pk_delete<pke_ui_box*>(parent->internal.children, prev_r_children); + pk_delete_arr<pke_ui_box*>(parent->internal.children, prev_r_children); } parent->internal.children = boxes; } |
