[gimp] libgimpcolor: Remove function pointer checks as they're checked by caller
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimpcolor: Remove function pointer checks as they're checked by caller
- Date: Wed, 12 Oct 2011 15:17:37 +0000 (UTC)
commit ff6727ae6666a9cc1efeba0f080e9f6124aff520
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]