[gimp/metadata-browser] libgimpcolor: Remove function pointer checks as they're checked by caller



commit 05784026a808093694b7d1bc8872e5b12df020b4
Author: Mukund Sivaraman <muks banu com>
Date:   Wed Oct 12 20:46:06 2011 +0530

    libgimpcolor: Remove function pointer checks as they're checked by caller
    
    Keeping the checks raises red flags in static analysis as render_func
    can then be NULL.

 libgimpcolor/gimpadaptivesupersample.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/libgimpcolor/gimpadaptivesupersample.c b/libgimpcolor/gimpadaptivesupersample.c
index e258978..0c79d3d 100644
--- a/libgimpcolor/gimpadaptivesupersample.c
+++ b/libgimpcolor/gimpadaptivesupersample.c
@@ -94,8 +94,7 @@ gimp_render_sub_pixel (gint             max_depth,
     {
       num_samples++;
 
-      if (render_func)
-        (* render_func) (x + dx1, y + dy1, &c[0], render_data);
+      render_func (x + dx1, y + dy1, &c[0], render_data);
 
       block[y1][x1].ready = TRUE;
       block[y1][x1].color = c[0];
@@ -111,8 +110,7 @@ gimp_render_sub_pixel (gint             max_depth,
     {
       num_samples++;
 
-      if (render_func)
-        (* render_func) (x + dx3, y + dy1, &c[1], render_data);
+      render_func (x + dx3, y + dy1, &c[1], render_data);
 
       block[y1][x3].ready = TRUE;
       block[y1][x3].color = c[1];
@@ -128,8 +126,7 @@ gimp_render_sub_pixel (gint             max_depth,
     {
       num_samples++;
 
-      if (render_func)
-        (* render_func) (x + dx1, y + dy3, &c[2], render_data);
+      render_func (x + dx1, y + dy3, &c[2], render_data);
 
       block[y3][x1].ready = TRUE;
       block[y3][x1].color = c[2];
@@ -145,8 +142,7 @@ gimp_render_sub_pixel (gint             max_depth,
     {
       num_samples++;
 
-      if (render_func)
-        (* render_func) (x + dx3, y + dy3, &c[3], render_data);
+      render_func (x + dx3, y + dy3, &c[3], render_data);
 
       block[y3][x3].ready = TRUE;
       block[y3][x3].color = c[3];



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