diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2011-11-30 19:04:17 -0500 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2011-11-30 19:04:17 -0500 |
commit | 864c5610f8de1dc865dd8e4431ab1a9ccca7c744 (patch) | |
tree | b3ccd777b05efa4637531e46991c6ed9348913f1 /gtk/gtkiconhelper.c | |
parent | d300ddc5e49f14c42cf9fb1a897899fb65b91da9 (diff) | |
download | gtk+-864c5610f8de1dc865dd8e4431ab1a9ccca7c744.tar.gz |
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.
Diffstat (limited to 'gtk/gtkiconhelper.c')
-rw-r--r-- | gtk/gtkiconhelper.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/gtk/gtkiconhelper.c b/gtk/gtkiconhelper.c index 063b7a8505..30f7e2cbeb 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; } |