From 0b9b5aa31d7e4a328959b3db3038b56a7cf89891 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 27 Jun 2013 00:18:13 -0400 Subject: ETableSortInfo: Use *unsigned* ints for index/length params. So we don't have to worry about negative values. --- e-util/e-table-sort-info.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'e-util/e-table-sort-info.c') diff --git a/e-util/e-table-sort-info.c b/e-util/e-table-sort-info.c index 9f9774555d..d6fadfd9a0 100644 --- a/e-util/e-table-sort-info.c +++ b/e-util/e-table-sort-info.c @@ -248,7 +248,7 @@ e_table_sort_info_grouping_get_count (ETableSortInfo *sort_info) static void table_sort_info_grouping_real_truncate (ETableSortInfo *sort_info, - gint length) + guint length) { if (length < sort_info->priv->group_count) sort_info->priv->group_count = length; @@ -271,7 +271,7 @@ table_sort_info_grouping_real_truncate (ETableSortInfo *sort_info, */ void e_table_sort_info_grouping_truncate (ETableSortInfo *sort_info, - gint length) + guint length) { g_return_if_fail (E_IS_TABLE_SORT_INFO (sort_info)); @@ -289,7 +289,7 @@ e_table_sort_info_grouping_truncate (ETableSortInfo *sort_info, */ ETableSortColumn e_table_sort_info_grouping_get_nth (ETableSortInfo *sort_info, - gint n) + guint n) { ETableSortColumn fake = {0, 0}; @@ -315,7 +315,7 @@ e_table_sort_info_grouping_get_nth (ETableSortInfo *sort_info, */ void e_table_sort_info_grouping_set_nth (ETableSortInfo *sort_info, - gint n, + guint n, ETableSortColumn column) { g_return_if_fail (E_IS_TABLE_SORT_INFO (sort_info)); @@ -344,7 +344,7 @@ e_table_sort_info_sorting_get_count (ETableSortInfo *sort_info) static void table_sort_info_sorting_real_truncate (ETableSortInfo *sort_info, - gint length) + guint length) { if (length < sort_info->priv->sort_count) sort_info->priv->sort_count = length; @@ -367,7 +367,7 @@ table_sort_info_sorting_real_truncate (ETableSortInfo *sort_info, */ void e_table_sort_info_sorting_truncate (ETableSortInfo *sort_info, - gint length) + guint length) { g_return_if_fail (E_IS_TABLE_SORT_INFO (sort_info)); @@ -385,7 +385,7 @@ e_table_sort_info_sorting_truncate (ETableSortInfo *sort_info, */ ETableSortColumn e_table_sort_info_sorting_get_nth (ETableSortInfo *sort_info, - gint n) + guint n) { ETableSortColumn fake = {0, 0}; @@ -408,7 +408,7 @@ e_table_sort_info_sorting_get_nth (ETableSortInfo *sort_info, */ void e_table_sort_info_sorting_set_nth (ETableSortInfo *sort_info, - gint n, + guint n, ETableSortColumn column) { g_return_if_fail (E_IS_TABLE_SORT_INFO (sort_info)); @@ -435,7 +435,7 @@ e_table_sort_info_load_from_node (ETableSortInfo *sort_info, xmlNode *node, gdouble state_version) { - gint i; + guint i; xmlNode *grouping; g_return_if_fail (E_IS_TABLE_SORT_INFO (sort_info)); @@ -457,8 +457,8 @@ e_table_sort_info_load_from_node (ETableSortInfo *sort_info, e_table_sort_info_sorting_set_nth (sort_info, i++, column); } } else { - gint gcnt = 0; - gint scnt = 0; + guint gcnt = 0; + guint scnt = 0; for (grouping = node->children; grouping; grouping = grouping->next) { ETableSortColumn column; @@ -494,9 +494,9 @@ e_table_sort_info_save_to_node (ETableSortInfo *sort_info, xmlNode *parent) { xmlNode *grouping; - gint sort_count; - gint group_count; - gint i; + guint sort_count; + guint group_count; + guint i; g_return_val_if_fail (E_IS_TABLE_SORT_INFO (sort_info), NULL); -- cgit v1.2.3