'Switch' statements with single case converted to 'if', other warnings fixed
This commit is contained in:
@@ -80,8 +80,7 @@ public class ExitHelper {
|
||||
}
|
||||
}
|
||||
|
||||
switch (stat.type) {
|
||||
case Statement.TYPE_IF:
|
||||
if (stat.type == Statement.TYPE_IF) {
|
||||
IfStatement ifst = (IfStatement)stat;
|
||||
if (ifst.getIfstat() == null) {
|
||||
StatEdge ifedge = ifst.getIfEdge();
|
||||
|
||||
@@ -376,8 +376,7 @@ public class MergeHelper {
|
||||
return stat;
|
||||
}
|
||||
|
||||
switch (stat.type) {
|
||||
case Statement.TYPE_SEQUENCE:
|
||||
if (stat.type == Statement.TYPE_SEQUENCE) {
|
||||
for (int i = stat.getStats().size() - 1; i >= 0; i--) {
|
||||
Statement tmp = getLastDirectData(stat.getStats().get(i));
|
||||
if (tmp == null || !tmp.getExprents().isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user