deal with pedantic code analyzer (fixes #4670)

This commit is contained in:
Ben Fry
2016-10-29 11:12:39 -04:00
parent b2f7fddaa5
commit d596697dee
2 changed files with 4 additions and 6 deletions

View File

@@ -2764,11 +2764,9 @@ public class JavaEditor extends Editor {
//private int howManyInts(ArrayList<Handle> handles[])
static private int howManyInts(List<List<Handle>> handles) {
int count = 0;
//for (int i=0; i<handles.length; i++) {
for (List<Handle> list : handles) {
//for (Handle n : handles[i]) {
for (Handle n : list) {
if (n.type == "int" || n.type == "hex" || n.type == "webcolor") {
if ("int".equals(n.type) || "hex".equals(n.type) || "webcolor".equals(n.type)) {
count++;
}
}
@@ -2780,11 +2778,9 @@ public class JavaEditor extends Editor {
//private int howManyFloats(ArrayList<Handle> handles[])
static private int howManyFloats(List<List<Handle>> handles) {
int count = 0;
//for (int i=0; i<handles.length; i++) {
for (List<Handle> list : handles) {
//for (Handle n : handles[i]) {
for (Handle n : list) {
if (n.type == "float") {
if ("float".equals(n.type)) {
count++;
}
}