Merge pull request #1930 from dhruv13J/master

IntList and FloatList insert()
This commit is contained in:
Ben Fry
2013-07-01 07:16:46 -07:00
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -301,7 +301,7 @@ public class FloatList implements Iterable<Float> {
if (index < 0) {
throw new IllegalArgumentException("insert() index cannot be negative: it was " + index);
}
if (index >= values.length) {
if (index >= data.length) {
throw new IllegalArgumentException("insert() index " + index + " is past the end of this list");
}
@@ -720,4 +720,4 @@ public class FloatList implements Iterable<Float> {
sb.append(" ]");
return sb.toString();
}
}
}
+2 -2
View File
@@ -255,7 +255,7 @@ public class IntList implements Iterable<Integer> {
if (index < 0) {
throw new IllegalArgumentException("insert() index cannot be negative: it was " + index);
}
if (index >= values.length) {
if (index >= data.length) {
throw new IllegalArgumentException("insert() index " + index + " is past the end of this list");
}
@@ -725,4 +725,4 @@ public class IntList implements Iterable<Integer> {
sb.append(" ]");
return sb.toString();
}
}
}