hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=34d92d4d1e7b08e7e1d60f4932da6b111f415edd

commit 34d92d4d1e7b08e7e1d60f4932da6b111f415edd
Author: jiin.moon <jiin.m...@samsung.com>
Date:   Fri Mar 20 14:02:58 2015 +0900

    emile: Remove unnecessary check in _emile_jpeg_head function
    
    Summary: Already checked it by "else if ((opts->w > 0) && (opts->h > 0))"
    
    Reviewers: cedric, Hermet
    
    Reviewed By: Hermet
    
    Subscribers: cedric
    
    Differential Revision: https://phab.enlightenment.org/D2199
---
 src/lib/emile/emile_image.c | 22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

diff --git a/src/lib/emile/emile_image.c b/src/lib/emile/emile_image.c
index 55ad99d..99a21b7 100644
--- a/src/lib/emile/emile_image.c
+++ b/src/lib/emile/emile_image.c
@@ -1441,23 +1441,15 @@ _emile_jpeg_head(Emile_Image *image,
              opts->h = load_opts_w;
           }
 
-        if (opts->w > 0)
-          {
-             w2 = opts->w;
-             h2 = (opts->w * prop->h) / prop->w;
-             if ((opts->h > 0) && (h2 > opts->h))
-               {
-                  unsigned int w3;
-                  h2 = opts->h;
-                  w3 = (opts->h * prop->w) / prop->h;
-                  if (w3 > w2)
-                    w2 = w3;
-               }
-          }
-        else if (opts->h > 0)
+        w2 = opts->w;
+        h2 = (opts->w * prop->h) / prop->w;
+        if (h2 > opts->h)
           {
+             unsigned int w3;
              h2 = opts->h;
-             w2 = (opts->h * prop->w) / prop->h;
+             w3 = (opts->h * prop->w) / prop->h;
+             if (w3 > w2)
+               w2 = w3;
           }
         prop->w = w2;
         prop->h = h2;

-- 


Reply via email to