[gnumeric] Style: don't track deps per-style anymore.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Style: don't track deps per-style anymore.
- Date: Mon, 18 Jan 2021 22:20:10 +0000 (UTC)
commit eee4e357ef164963021596c8a385ba685b326895
Author: Morten Welinder <terra gnome org>
Date: Mon Jan 18 17:18:37 2021 -0500
Style: don't track deps per-style anymore.
We no longer insert anything into ->deps, so drop it completely together
with code that's a no-op now.
src/mstyle.c | 31 +------------------------------
1 file changed, 1 insertion(+), 30 deletions(-)
---
diff --git a/src/mstyle.c b/src/mstyle.c
index f0cd89c5c..4c4c8ff27 100644
--- a/src/mstyle.c
+++ b/src/mstyle.c
@@ -105,8 +105,6 @@ struct _GnmStyle {
GnmInputMsg *input_msg;
GnmStyleConditions *conditions;
GPtrArray *cond_styles;
-
- GPtrArray *deps;
};
#define elem_changed(style, elem) do { (style)->changed |= (1u << (elem)); } while(0)
@@ -870,12 +868,6 @@ gnm_style_unref (GnmStyle const *style)
gnm_style_clear_pango (unconst);
gnm_style_clear_font (unconst);
- if (style->deps) {
- if (style->deps->len > 0)
- g_warning ("Leftover style deps!");
- g_ptr_array_free (style->deps, TRUE);
- }
-
CHUNK_FREE (gnm_style_pool, unconst);
}
}
@@ -2350,7 +2342,6 @@ gnm_style_link_dependents (GnmStyle *style, GnmRange const *r)
void
gnm_style_unlink_dependents (GnmStyle *style, GnmRange const *r)
{
- unsigned ui, k;
GnmStyleConditions *sc;
Sheet *sheet;
@@ -2366,27 +2357,7 @@ gnm_style_unlink_dependents (GnmStyle *style, GnmRange const *r)
sheet_conditions_remove (sheet, r, style);
}
- if (!style->deps)
- return;
-
- for (ui = k = 0; ui < style->deps->len; ui++) {
- GnmDependent *dep = g_ptr_array_index (style->deps, ui);
- GnmCellPos const *pos = dependent_pos (dep);
-
- if (dep->sheet->being_destructed ||
- range_contains (r, pos->col, pos->row)) {
- if (debug_style_deps)
- g_printerr ("Unlinking %s for %p\n",
- cellpos_as_string (pos), style);
- dependent_set_expr (dep, NULL);
- g_free (dep);
- } else {
- g_ptr_array_index (style->deps, k) = dep;
- k++;
- }
- }
-
- g_ptr_array_set_size (style->deps, k);
+ // Validation -- see gnm_style_link_dependents
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]