[9ae8f17cfc8ba7fd8fb34b2a194ef965a3b36a40839a46eeab1350e916692ac9/incremental-sort: 2/5] sorter: Remove a return_if_fail()



commit abd9a19a9485b9ce97b26060c5edce285aad3cad
Author: Benjamin Otte <otte redhat com>
Date:   Tue Jul 7 19:02:29 2020 +0200

    sorter: Remove a return_if_fail()
    
    It's too expsensive.

 gtk/gtksorter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtksorter.c b/gtk/gtksorter.c
index 22ef6c4644..9169d22979 100644
--- a/gtk/gtksorter.c
+++ b/gtk/gtksorter.c
@@ -142,7 +142,8 @@ gtk_sorter_compare (GtkSorter *self,
 {
   GtkOrdering result;
 
-  g_return_val_if_fail (GTK_IS_SORTER (self), GTK_ORDERING_EQUAL);
+  /* We turn this off because gtk_sorter_compare() is called so much that it's too expensive */
+  /* g_return_val_if_fail (GTK_IS_SORTER (self), GTK_ORDERING_EQUAL); */
   g_return_val_if_fail (item1 && item2, GTK_ORDERING_EQUAL);
 
   if (item1 == item2)


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