[gtk+] icon-helper: remove useless checks
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] icon-helper: remove useless checks
- Date: Thu, 1 Dec 2011 00:17:52 +0000 (UTC)
commit 864c5610f8de1dc865dd8e4431ab1a9ccca7c744
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Nov 30 19:04:17 2011 -0500
icon-helper: remove useless checks
When we change storage type, we always clear the rest of the object, so
these checks do not add any safety.
gtk/gtkiconhelper.c | 18 ------------------
1 files changed, 0 insertions(+), 18 deletions(-)
---
diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c
index 063b7a8..30f7e2c 100644
--- a/gtk/gtkiconhelper.c
+++ b/gtk/gtkiconhelper.c
@@ -502,54 +502,36 @@ _gtk_icon_helper_get_pixel_size (GtkIconHelper *self)
GdkPixbuf *
_gtk_icon_helper_peek_pixbuf (GtkIconHelper *self)
{
- g_return_val_if_fail (self->priv->storage_type == GTK_IMAGE_PIXBUF ||
- self->priv->storage_type == GTK_IMAGE_EMPTY, NULL);
-
return self->priv->orig_pixbuf;
}
GIcon *
_gtk_icon_helper_peek_gicon (GtkIconHelper *self)
{
- g_return_val_if_fail (self->priv->storage_type == GTK_IMAGE_GICON ||
- self->priv->storage_type == GTK_IMAGE_EMPTY, NULL);
-
return self->priv->gicon;
}
GdkPixbufAnimation *
_gtk_icon_helper_peek_animation (GtkIconHelper *self)
{
- g_return_val_if_fail (self->priv->storage_type == GTK_IMAGE_ANIMATION ||
- self->priv->storage_type == GTK_IMAGE_EMPTY, NULL);
-
return self->priv->animation;
}
GtkIconSet *
_gtk_icon_helper_peek_icon_set (GtkIconHelper *self)
{
- g_return_val_if_fail (self->priv->storage_type == GTK_IMAGE_ICON_SET ||
- self->priv->storage_type == GTK_IMAGE_EMPTY, NULL);
-
return self->priv->icon_set;
}
const gchar *
_gtk_icon_helper_get_stock_id (GtkIconHelper *self)
{
- g_return_val_if_fail (self->priv->storage_type == GTK_IMAGE_STOCK ||
- self->priv->storage_type == GTK_IMAGE_EMPTY, NULL);
-
return self->priv->stock_id;
}
const gchar *
_gtk_icon_helper_get_icon_name (GtkIconHelper *self)
{
- g_return_val_if_fail (self->priv->storage_type == GTK_IMAGE_ICON_NAME ||
- self->priv->storage_type == GTK_IMAGE_EMPTY, NULL);
-
return self->priv->icon_name;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]