You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
馃憖 Some source code analysis tools can help to find opportunities for improving software components.
馃挱 I propose to increase the usage of compound operators accordingly.
diff --git a/src/main/java/nodebox/function/DeviceFunctions.java b/src/main/java/nodebox/function/DeviceFunctions.java
index cfd84cfa..1032add5 100644
--- a/src/main/java/nodebox/function/DeviceFunctions.java+++ b/src/main/java/nodebox/function/DeviceFunctions.java@@ -77,7 +77,7 @@ public class DeviceFunctions {
String convertedAddressPrefix = upMatcher.replaceAll("(XXXPLHXXX)");
if (! convertedAddressPrefix.endsWith("*"))
- convertedAddressPrefix = convertedAddressPrefix + "*";+ convertedAddressPrefix += "*";
convertedAddressPrefix = convertedAddressPrefix.replaceAll("\\*", ".*?");
convertedAddressPrefix = "^" + convertedAddressPrefix.replaceAll("(XXXPLHXXX)", "[^\\/]*") + "$";
diff --git a/src/main/java/nodebox/graphics/Color.java b/src/main/java/nodebox/graphics/Color.java
index 81843954..372c8ae4 100644
--- a/src/main/java/nodebox/graphics/Color.java+++ b/src/main/java/nodebox/graphics/Color.java@@ -283,7 +283,7 @@ public final class Color implements Cloneable {
double s = this.s;
double v = this.v;
double f, p, q, t;
- h = h / (60.0 / 360);+ h /= 60.0 / 360;
int i = (int) Math.floor(h);
f = h - i;
p = v * (1 - s);
@@ -326,9 +326,9 @@ public final class Color implements Cloneable {
h = 4 + (r - g) / d;
}
- h = h * (60.0 / 360);+ h *= 60.0 / 360;
if (h < 0)
- h = h + 1;+ h += 1;
return new double[]{h, s, v};
}
diff --git a/src/main/java/nodebox/ui/ColorDialog.java b/src/main/java/nodebox/ui/ColorDialog.java
index 4e721815..b5dbc5fd 100644
--- a/src/main/java/nodebox/ui/ColorDialog.java+++ b/src/main/java/nodebox/ui/ColorDialog.java@@ -88,7 +88,7 @@ public class ColorDialog extends JDialog implements ChangeListener {
if (! s.startsWith("#"))
s = "#" + s;
if (s.length() == 7)
- s = s + "ff";+ s += "ff";
try {
nodebox.graphics.Color c = new nodebox.graphics.Color(s);
red = (float) c.getRed();
@@ -217,7 +217,7 @@ public class ColorDialog extends JDialog implements ChangeListener {
float s = saturation;
float v = brightness;
float r, g, b, f, p, q, t;
- h = h / (float) (60.0 / 360);+ h /= (float) (60.0 / 360);
int i = (int) Math.floor(h);
f = h - i;
p = v * (1 - s);
@@ -271,9 +271,9 @@ public class ColorDialog extends JDialog implements ChangeListener {
h = 4 + (red - green) / d;
}
- h = h * (float) (60.0 / 360);+ h *= (float) (60.0 / 360);
if (h < 0)
- h = h + 1;+ h += 1;
hue = h;
saturation = s;
The text was updated successfully, but these errors were encountered:
馃憖 Some source code analysis tools can help to find opportunities for improving software components.
馃挱 I propose to increase the usage of compound operators accordingly.
The text was updated successfully, but these errors were encountered: