[gnumeric] Criteria: remove a level of indirection.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] Criteria: remove a level of indirection.
- Date: Mon, 7 May 2018 00:47:01 +0000 (UTC)
commit b20f271a17ecde775d0c123608415dca32bde81b
Author: Morten Welinder <terra gnome org>
Date: Sun May 6 20:46:24 2018 -0400
Criteria: remove a level of indirection.
src/criteria.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/src/criteria.c b/src/criteria.c
index d3c4471..0773c0a 100644
--- a/src/criteria.c
+++ b/src/criteria.c
@@ -534,15 +534,13 @@ find_rows_that_match (Sheet *sheet, int first_col, int first_row,
break;
}
if (add_flag) {
- gint *p;
-
if (unique_only) {
GSList *c;
GnmCell *cell;
- gint i, trow;
+ gint i;
for (c = rows; c != NULL; c = c->next) {
- trow = *((gint *) c->data);
+ int trow = GPOINTER_TO_INT (c->data);
for (i = first_col; i <= last_col; i++) {
test_cell = sheet_cell_get (sheet, i, trow);
cell = sheet_cell_get (sheet, i, row);
@@ -565,9 +563,7 @@ row_ok:
;
}
}
- p = g_new (gint, 1);
- *p = row;
- rows = g_slist_prepend (rows, (gpointer) p);
+ rows = g_slist_prepend (rows, GINT_TO_POINTER (row));
filter_row:
;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]