[gimp/metadata-browser] file-xwd: Change if statements list to a switch
- From: Roman Joost <romanofski src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/metadata-browser] file-xwd: Change if statements list to a switch
- Date: Fri, 2 Dec 2011 02:10:26 +0000 (UTC)
commit 473540fb7fd6a9be5c966f04e9bd470ece01e2f1
Author: Mukund Sivaraman <muks banu com>
Date: Thu Oct 6 19:35:21 2011 +0530
file-xwd: Change if statements list to a switch
plug-ins/common/file-xwd.c | 22 ++++++++++++++--------
1 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/plug-ins/common/file-xwd.c b/plug-ins/common/file-xwd.c
index 52f286f..851fd3f 100644
--- a/plug-ins/common/file-xwd.c
+++ b/plug-ins/common/file-xwd.c
@@ -624,14 +624,20 @@ save_image (const gchar *filename,
gimp_progress_init_printf (_("Saving '%s'"),
gimp_filename_to_utf8 (filename));
- if (drawable_type == GIMP_INDEXED_IMAGE)
- retval = save_index (ofp, image_ID, drawable_ID, 0);
- else if (drawable_type == GIMP_GRAY_IMAGE)
- retval = save_index (ofp, image_ID, drawable_ID, 1);
- else if (drawable_type == GIMP_RGB_IMAGE)
- retval = save_rgb (ofp, image_ID, drawable_ID);
- else
- retval = FALSE;
+ switch (drawable_type)
+ {
+ case GIMP_INDEXED_IMAGE:
+ retval = save_index (ofp, image_ID, drawable_ID, 0);
+ break;
+ case GIMP_GRAY_IMAGE:
+ retval = save_index (ofp, image_ID, drawable_ID, 1);
+ break;
+ case GIMP_RGB_IMAGE:
+ retval = save_rgb (ofp, image_ID, drawable_ID);
+ break;
+ default:
+ retval = FALSE;
+ }
gimp_progress_update (1.0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]