[gimp/gimp-2-8] app: remove unused code
- From: Massimo Valentini <mvalentini src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] app: remove unused code
- Date: Sat, 13 Oct 2012 13:33:50 +0000 (UTC)
commit 023850bf0d90bc1c3ce2785a40cb10ce094853a3
Author: Massimo Valentini <mvalentini src gnome org>
Date: Sat Oct 13 14:56:46 2012 +0200
app: remove unused code
levelx and levely are 0 initialized and possibly increased
never become negative.
app/paint-funcs/scale-region.c | 73 ----------------------------------------
1 files changed, 0 insertions(+), 73 deletions(-)
---
diff --git a/app/paint-funcs/scale-region.c b/app/paint-funcs/scale-region.c
index aa39909..c58735b 100644
--- a/app/paint-funcs/scale-region.c
+++ b/app/paint-funcs/scale-region.c
@@ -240,32 +240,6 @@ scale_determine_progress (PixelRegion *srcPR,
/* The logic here should be kept in sync with scale_region_tile(). */
- while (levelx < 0 && levely < 0)
- {
- width <<= 1;
- height <<= 1;
- levelx++;
- levely++;
-
- tiles += NUM_TILES (width, height);
- }
-
- while (levelx < 0)
- {
- width <<= 1;
- levelx++;
-
- tiles += NUM_TILES (width, height);
- }
-
- while (levely < 0)
- {
- height <<= 1;
- levely++;
-
- tiles += NUM_TILES (width, height);
- }
-
while (levelx > 0 && levely > 0)
{
width >>= 1;
@@ -329,53 +303,6 @@ scale_region_tile (PixelRegion *srcPR,
progress_callback, progress_data, &progress, max_progress);
}
- while (levelx < 0 && levely < 0)
- {
- width <<= 1;
- height <<= 1;
-
- tmpTM = tile_manager_new (width, height, bytes);
- scale (srcTM, tmpTM, interpolation,
- progress_callback, progress_data, &progress, max_progress);
-
- if (srcTM != srcPR->tiles)
- tile_manager_unref (srcTM);
-
- srcTM = tmpTM;
- levelx++;
- levely++;
- }
-
- while (levelx < 0)
- {
- width <<= 1;
-
- tmpTM = tile_manager_new (width, height, bytes);
- scale (srcTM, tmpTM, interpolation,
- progress_callback, progress_data, &progress, max_progress);
-
- if (srcTM != srcPR->tiles)
- tile_manager_unref (srcTM);
-
- srcTM = tmpTM;
- levelx++;
- }
-
- while (levely < 0)
- {
- height <<= 1;
-
- tmpTM = tile_manager_new (width, height, bytes);
- scale (srcTM, tmpTM, interpolation,
- progress_callback, progress_data, &progress, max_progress);
-
- if (srcTM != srcPR->tiles)
- tile_manager_unref (srcTM);
-
- srcTM = tmpTM;
- levely++;
- }
-
while (levelx > 0 && levely > 0)
{
width >>= 1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]