From df6150c8110449d980ace82f1a29a07d8bb9375f Mon Sep 17 00:00:00 2001 From: Ryan Fleury Date: Thu, 29 Aug 2024 12:48:54 -0700 Subject: [PATCH] always produce inheritance child cfg tables for each viz block --- src/dbg_frontend/dbg_frontend_core.h | 2 -- src/dbg_frontend/dbg_frontend_view_rules.c | 15 ++++++--------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/dbg_frontend/dbg_frontend_core.h b/src/dbg_frontend/dbg_frontend_core.h index 04534219..7c81cbc9 100644 --- a/src/dbg_frontend/dbg_frontend_core.h +++ b/src/dbg_frontend/dbg_frontend_core.h @@ -80,8 +80,6 @@ struct DF_SettingVal //~ rjf: View Hook Function Types typedef struct DF_View DF_View; -typedef struct DF_Panel DF_Panel; -typedef struct DF_Window DF_Window; #define DF_VIEW_SETUP_FUNCTION_SIG(name) void name(DF_View *view, MD_Node *params, String8 string) #define DF_VIEW_SETUP_FUNCTION_NAME(name) df_view_setup_##name diff --git a/src/dbg_frontend/dbg_frontend_view_rules.c b/src/dbg_frontend/dbg_frontend_view_rules.c index 82c17e97..f1874675 100644 --- a/src/dbg_frontend/dbg_frontend_view_rules.c +++ b/src/dbg_frontend/dbg_frontend_view_rules.c @@ -54,13 +54,12 @@ D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(default) last_vb = d_eval_viz_block_split_and_continue(arena, out, last_vb, child_idx); // rjf: build child config table - D_CfgTable *child_cfg_table = cfg_table; + D_CfgTable *child_cfg_table = push_array(arena, D_CfgTable, 1); + *child_cfg_table = d_cfg_table_from_inheritance(arena, cfg_table); { String8 view_rule_string = d_eval_view_rule_from_key(eval_view, child->key); if(view_rule_string.size != 0) { - child_cfg_table = push_array(arena, D_CfgTable, 1); - *child_cfg_table = d_cfg_table_from_inheritance(arena, cfg_table); d_cfg_table_push_unparsed_string(arena, child_cfg_table, view_rule_string, D_CfgSrc_User); } } @@ -124,13 +123,12 @@ D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(default) last_vb = d_eval_viz_block_split_and_continue(arena, out, last_vb, child_idx); // rjf: build child config table - D_CfgTable *child_cfg_table = cfg_table; + D_CfgTable *child_cfg_table = push_array(arena, D_CfgTable, 1); + *child_cfg_table = d_cfg_table_from_inheritance(arena, cfg_table); { String8 view_rule_string = d_eval_view_rule_from_key(eval_view, child->key); if(view_rule_string.size != 0) { - child_cfg_table = push_array(arena, D_CfgTable, 1); - *child_cfg_table = d_cfg_table_from_inheritance(arena, cfg_table); d_cfg_table_push_unparsed_string(arena, child_cfg_table, view_rule_string, D_CfgSrc_User); } } @@ -150,13 +148,12 @@ D_VIEW_RULE_VIZ_BLOCK_PROD_FUNCTION_DEF(default) D_ExpandKey child_key = d_expand_key_make(df_hash_from_expand_key(key), 1); // rjf: build child config table - D_CfgTable *child_cfg_table = cfg_table; + D_CfgTable *child_cfg_table = push_array(arena, D_CfgTable, 1); + *child_cfg_table = d_cfg_table_from_inheritance(arena, cfg_table); { String8 view_rule_string = d_eval_view_rule_from_key(eval_view, child_key); if(view_rule_string.size != 0) { - child_cfg_table = push_array(arena, D_CfgTable, 1); - *child_cfg_table = d_cfg_table_from_inheritance(arena, cfg_table); d_cfg_table_push_unparsed_string(arena, child_cfg_table, view_rule_string, D_CfgSrc_User); } }