From 22f123f0a7d8a0490781067a5326146e17a31882 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Thu, 15 Oct 2015 15:32:36 +0200 Subject: Simplify returns --- src/main/java/Filter.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/Filter.java b/src/main/java/Filter.java index 03c8b0b..1e50d7e 100644 --- a/src/main/java/Filter.java +++ b/src/main/java/Filter.java @@ -20,7 +20,6 @@ public final class Filter { {1, 2, 1} }; - /** * Get a pixel without accessing out of bounds * @@ -79,8 +78,7 @@ public final class Filter { * @return a HxW float array */ public static float[][] smooth(float[][] gray) { - float[][] smoothtImage = Filter.filter(gray, SMOOTH_CORE); - return smoothtImage; + return Filter.filter(gray, SMOOTH_CORE); } /** @@ -90,8 +88,7 @@ public final class Filter { * @return a HxW float array */ public static float[][] sobelX(float[][] gray) { - float[][] sobelXImage = Filter.filter(gray, SOBEL_X_CORE); - return sobelXImage; + return Filter.filter(gray, SOBEL_X_CORE); } /** @@ -101,8 +98,7 @@ public final class Filter { * @return a HxW float array */ public static float[][] sobelY(float[][] gray) { - float[][] sobelYImage = Filter.filter(gray, SOBEL_Y_CORE); - return sobelYImage; + return Filter.filter(gray, SOBEL_Y_CORE); } /** -- cgit v1.2.3