Some minor improvements from static analysis

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2017-11-07 17:28:28 +11:00
parent 2a82e16c61
commit 417599c2ab
15 changed files with 44 additions and 56 deletions

View File

@@ -345,10 +345,10 @@ public class Potion {
level++;
potion = new Potion(type, level);
}
if ((damage & SPLASH_BIT) > 0) {
if ((damage & SPLASH_BIT) != 0) {
potion = potion.splash();
}
if ((damage & EXTENDED_BIT) > 0) {
if ((damage & EXTENDED_BIT) != 0) {
potion = potion.extend();
}
return potion;