[gimp] app: some cleanup in the first of the two assert removals below



commit 6d075aa10a17149255042ab9eace247713881de1
Author: Michael Natterer <mitch gimp org>
Date:   Tue Jan 23 19:50:07 2018 +0100

    app: some cleanup in the first of the two assert removals below

 app/core/gimpdrawable-transform.c |    2 ++
 app/core/gimpgrouplayer.c         |    2 --
 app/core/gimpimage-rotate.c       |   12 ++++++------
 app/core/gimpimage.c              |    2 --
 4 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/app/core/gimpdrawable-transform.c b/app/core/gimpdrawable-transform.c
index fb2e654..d613ca1 100644
--- a/app/core/gimpdrawable-transform.c
+++ b/app/core/gimpdrawable-transform.c
@@ -347,6 +347,8 @@ gimp_drawable_transform_rotate_point (gint              x,
       break;
 
     default:
+      *new_x = x;
+      *new_y = y;
       g_return_if_reached ();
     }
 }
diff --git a/app/core/gimpgrouplayer.c b/app/core/gimpgrouplayer.c
index dca2d4a..a7746f8 100644
--- a/app/core/gimpgrouplayer.c
+++ b/app/core/gimpgrouplayer.c
@@ -896,8 +896,6 @@ get_projection_format (GimpProjectable   *projectable,
     }
 
   g_return_val_if_reached (NULL);
-
-  return NULL;
 }
 
 static void
diff --git a/app/core/gimpimage-rotate.c b/app/core/gimpimage-rotate.c
index 56a2e32..ac09ce1 100644
--- a/app/core/gimpimage-rotate.c
+++ b/app/core/gimpimage-rotate.c
@@ -71,8 +71,6 @@ gimp_image_rotate (GimpImage        *image,
   g_return_if_fail (GIMP_IS_CONTEXT (context));
   g_return_if_fail (progress == NULL || GIMP_IS_PROGRESS (progress));
 
-  gimp_set_busy (image->gimp);
-
   previous_image_width  = gimp_image_get_width  (image);
   previous_image_height = gimp_image_get_height (image);
 
@@ -84,10 +82,6 @@ gimp_image_rotate (GimpImage        *image,
                   gimp_container_get_n_children (gimp_image_get_vectors (image))  +
                   1 /* selection */);
 
-  g_object_freeze_notify (G_OBJECT (image));
-
-  gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_IMAGE_ROTATE, NULL);
-
   /*  Resize the image (if needed)  */
   switch (rotate_type)
     {
@@ -113,6 +107,12 @@ gimp_image_rotate (GimpImage        *image,
       return;
     }
 
+  gimp_set_busy (image->gimp);
+
+  g_object_freeze_notify (G_OBJECT (image));
+
+  gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_IMAGE_ROTATE, NULL);
+
   /*  Rotate all channels  */
   for (list = gimp_image_get_channel_iter (image);
        list;
diff --git a/app/core/gimpimage.c b/app/core/gimpimage.c
index 77245f9..8830a22 100644
--- a/app/core/gimpimage.c
+++ b/app/core/gimpimage.c
@@ -1449,8 +1449,6 @@ gimp_image_get_proj_format (GimpProjectable *projectable)
     }
 
   g_return_val_if_reached (NULL);
-
-  return NULL;
 }
 
 static void


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