From 4df4b91d0957cddeb64f2eb88bea472b17e36e41 Mon Sep 17 00:00:00 2001 From: Restioson Date: Tue, 16 May 2017 20:02:59 +0200 Subject: [PATCH] Converted (!x == y) to x != y --- .../shared/peripheral/speaker/SpeakerPeripheral.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/dan200/computercraft/shared/peripheral/speaker/SpeakerPeripheral.java b/src/main/java/dan200/computercraft/shared/peripheral/speaker/SpeakerPeripheral.java index 669b532b0..e3e98fbe4 100644 --- a/src/main/java/dan200/computercraft/shared/peripheral/speaker/SpeakerPeripheral.java +++ b/src/main/java/dan200/computercraft/shared/peripheral/speaker/SpeakerPeripheral.java @@ -150,7 +150,7 @@ public class SpeakerPeripheral implements IPeripheral { if (arguments.length > 1) { - if (!(arguments[1] instanceof Double) && !(arguments[1] == null)) // Arg wrong type + if (!(arguments[1] instanceof Double) && arguments[1] != null) // Arg wrong type { throw new LuaException("Expected string, number (optional), number (optional)"); } @@ -160,7 +160,7 @@ public class SpeakerPeripheral implements IPeripheral { if (arguments.length > 2) { - if (!(arguments[1] instanceof Double) && !(arguments[2] == null)) // Arg wrong type + if (!(arguments[1] instanceof Double) && arguments[2] != null) // Arg wrong type { throw new LuaException("Expected string, number (optional), number (optional)"); } @@ -200,7 +200,7 @@ public class SpeakerPeripheral implements IPeripheral { if (arguments.length > 1) { - if (!(arguments[1] instanceof Double) && !(arguments[1] == null)) // Arg wrong type + if (!(arguments[1] instanceof Double) && arguments[1] != null) // Arg wrong type { throw new LuaException("Expected string, number (optional), number (optional)"); } @@ -211,7 +211,7 @@ public class SpeakerPeripheral implements IPeripheral { if (arguments.length > 2) { - if (!(arguments[2] instanceof Double) && !(arguments[2] == null)) // Arg wrong type + if (!(arguments[2] instanceof Double) && arguments[2] != null) // Arg wrong type { throw new LuaException("Expected string, number (optional), number (optional)"); }