[gtk+] Remove type check from gtk_widget_get_request_mode



commit caa0ee3d252752be5623f7278ee0f0004fc1a728
Author: Matthias Clasen <mclasen redhat com>
Date:   Fri Sep 11 09:08:36 2015 -0400

    Remove type check from gtk_widget_get_request_mode

 gtk/gtksizerequest.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtksizerequest.c b/gtk/gtksizerequest.c
index 8fe24cb..058f01f 100644
--- a/gtk/gtksizerequest.c
+++ b/gtk/gtksizerequest.c
@@ -446,11 +446,9 @@ gtk_widget_get_request_mode (GtkWidget *widget)
 {
   SizeRequestCache *cache;
 
-  g_return_val_if_fail (GTK_IS_WIDGET (widget), GTK_SIZE_REQUEST_CONSTANT_SIZE);
-
   cache = _gtk_widget_peek_request_cache (widget);
 
-  if (!cache->request_mode_valid)
+  if (G_UNLIKELY (!cache->request_mode_valid))
     {
       cache->request_mode = GTK_WIDGET_GET_CLASS (widget)->get_request_mode (widget);
       cache->request_mode_valid = TRUE;


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