From 327e02537a371f0278cb695a6f5bf6629231e187 Mon Sep 17 00:00:00 2001 From: Mukund Sivaraman Date: Mon, 3 Oct 2011 12:52:46 +0530 Subject: [PATCH] sphere-designer: Lessen code --- plug-ins/common/sphere-designer.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plug-ins/common/sphere-designer.c b/plug-ins/common/sphere-designer.c index 177aa47ce9..51ee02531f 100644 --- a/plug-ins/common/sphere-designer.c +++ b/plug-ins/common/sphere-designer.c @@ -1380,7 +1380,7 @@ calclight (GimpVector4 * col, GimpVector4 * point, common * obj) static void calcphong (common * obj, ray * r2, GimpVector4 * col) { - gint i, j, o; + gint i, j; ray r; gdouble b; GimpVector4 lcol; @@ -1403,11 +1403,8 @@ calcphong (common * obj, ray * r2, GimpVector4 * col) vcopy (&r.v2, &world.light[i].a); vmix (&r.v1, &r.v1, &r.v2, 0.9999); - o = traceray (&r, NULL, -1, 1.0); - if (o) - { - continue; - } + if (traceray (&r, NULL, -1, 1.0)) + continue; /* OK, light is visible */