[gnumeric] Compilation: remove unused functions.



commit 52571d71d2411d8b17fea751af63ea2758d23e78
Author: Morten Welinder <terra gnome org>
Date:   Tue Jul 3 18:30:11 2012 -0400

    Compilation: remove unused functions.

 ChangeLog    |    3 +++
 src/ranges.c |   23 -----------------------
 src/ranges.h |    2 --
 3 files changed, 3 insertions(+), 25 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 649b16e..6d2ce81 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-07-03  Morten Welinder  <terra gnome org>
 
+	* src/ranges.c (gnm_sheet_range_hash, gnm_range_hash): Delete
+	crummy and unused hash functions.
+
 	* src/sheet.c (cell_set_hash): Use a decent hash.
 	(sheet_foreach_cell_in_range): Use different algorithm when the
 	range is big and we only need existing cells.
diff --git a/src/ranges.c b/src/ranges.c
index 31d3ed6..f94aa04 100644
--- a/src/ranges.c
+++ b/src/ranges.c
@@ -784,23 +784,6 @@ gnm_range_equal (const GnmRange *a, const GnmRange *b)
 	return range_equal (a, b);
 }
 
-guint
-gnm_range_hash (const GnmRange *r)
-{
-	guint res = 0;
-
-	res ^= r->start.col;
-	res *= 17;
-	res ^= r->start.row;
-	res *= 17;
-	res ^= r->end.col;
-	res *= 17;
-	res ^= r->end.row;
-
-	return res;
-}
-
-
 GnmSheetRange *
 gnm_sheet_range_new (Sheet *sheet, GnmRange const *r)
 {
@@ -854,12 +837,6 @@ gnm_sheet_range_equal (const GnmSheetRange *a,
 	return a->sheet == b->sheet && range_equal (&a->range, &b->range);
 }
 
-guint
-gnm_sheet_range_hash (const GnmSheetRange *sr)
-{
-	return gnm_range_hash (&sr->range) ^ sr->sheet->index_in_wb;
-}
-
 gboolean
 gnm_sheet_range_overlap (GnmSheetRange const *a, GnmSheetRange const *b)
 {
diff --git a/src/ranges.h b/src/ranges.h
index b22afd7..e581f8a 100644
--- a/src/ranges.h
+++ b/src/ranges.h
@@ -24,7 +24,6 @@ G_BEGIN_DECLS
 GType	  gnm_range_get_type (void); /* GBoxedType */
 GnmRange *gnm_range_dup	  (GnmRange const *r);
 gboolean  gnm_range_equal (GnmRange const *a, GnmRange const *b);
-guint	  gnm_range_hash  (GnmRange const *r);
 
 /**
  * range_overlap:
@@ -112,7 +111,6 @@ gboolean       gnm_sheet_range_overlap    (GnmSheetRange const *a, GnmSheetRange
 GnmSheetRange *gnm_sheet_range_dup	  (GnmSheetRange const *sr);
 gboolean       gnm_sheet_range_equal      (GnmSheetRange const *a,
 					   GnmSheetRange const *b);
-guint          gnm_sheet_range_hash       (GnmSheetRange const *sr);
 
 char	      *global_range_name	  (Sheet const *sheet, GnmRange const *r);
 char	      *undo_cell_pos_name	  (Sheet const *sheet, GnmCellPos const *pos);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]