diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2017-07-31 10:49:27 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2017-07-31 10:58:04 +0900 |
commit | 6ac4ea20807722a906141a4159579cca22e87160 (patch) | |
tree | e685fd14c52ff20a945716ddd3aad987f44e18ab | |
parent | 2d4d836018387470b5df2c59119ab6cc81188e94 (diff) | |
download | efl-6ac4ea20807722a906141a4159579cca22e87160.tar.gz |
evas cache2 - remove excess file and key checks - only check file
no need for key as no key is handled and no file is handled too. cleaner
code.
found by PVS studio
-rw-r--r-- | src/lib/evas/cache2/evas_cache2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/evas/cache2/evas_cache2.c b/src/lib/evas/cache2/evas_cache2.c index a7bd68c453..996a2a4c5c 100644 --- a/src/lib/evas/cache2/evas_cache2.c +++ b/src/lib/evas/cache2/evas_cache2.c @@ -822,7 +822,7 @@ _scaled_image_find(Image_Entry *im, int src_x, int src_y, int src_w, Evas_Image_Load_Opts lo; Image_Entry *ret; - if (((!im->file) || ((!im->file) && (!im->key))) || (!im->data1) || + if ((!im->file) || (!im->data1) || ((src_w == dst_w) && (src_h == dst_h)) || ((!im->flags.alpha) && (!smooth))) return NULL; @@ -902,7 +902,7 @@ evas_cache2_image_scale_load(Image_Entry *im, (im->scale_hint != EVAS_IMAGE_SCALE_HINT_DYNAMIC)) goto parent_out; - if (((!im->file) || ((!im->file) && (!im->key))) || + if ((!im->file) || ((src_w == 0) || (src_h == 0) || (dst_w == 0) || (dst_h == 0)) || (im->scale_hint == EVAS_IMAGE_SCALE_HINT_DYNAMIC)) goto parent_out; |