mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
check on indices settings for the other Dict classes
This commit is contained in:
@@ -53,18 +53,16 @@ public class FloatDict {
|
||||
* @nowebref
|
||||
*/
|
||||
public FloatDict(BufferedReader reader) {
|
||||
// public FloatHash(PApplet parent, String filename) {
|
||||
String[] lines = PApplet.loadStrings(reader);
|
||||
keys = new String[lines.length];
|
||||
values = new float[lines.length];
|
||||
|
||||
// boolean csv = (lines[0].indexOf('\t') == -1);
|
||||
for (int i = 0; i < lines.length; i++) {
|
||||
// String[] pieces = csv ? Table.splitLineCSV(lines[i]) : PApplet.split(lines[i], '\t');
|
||||
String[] pieces = PApplet.split(lines[i], '\t');
|
||||
if (pieces.length == 2) {
|
||||
keys[count] = pieces[0];
|
||||
values[count] = PApplet.parseFloat(pieces[1]);
|
||||
indices.put(pieces[0], count);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,14 +76,11 @@ public class IntDict {
|
||||
* @nowebref
|
||||
*/
|
||||
public IntDict(BufferedReader reader) {
|
||||
// public IntHash(PApplet parent, String filename) {
|
||||
String[] lines = PApplet.loadStrings(reader);
|
||||
keys = new String[lines.length];
|
||||
values = new int[lines.length];
|
||||
|
||||
// boolean csv = (lines[0].indexOf('\t') == -1);
|
||||
for (int i = 0; i < lines.length; i++) {
|
||||
// String[] pieces = csv ? Table.splitLineCSV(lines[i]) : PApplet.split(lines[i], '\t');
|
||||
String[] pieces = PApplet.split(lines[i], '\t');
|
||||
if (pieces.length == 2) {
|
||||
keys[count] = pieces[0];
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
0225 core
|
||||
X bug with StringDict(Reader) that wasn't setting the indices hashmap
|
||||
_ check this with other versions of this class
|
||||
X check this with other versions of this class
|
||||
X call revalidate() via reflection
|
||||
X text looks lousy compared to the Apple JVM
|
||||
X mess with rendering hints? (notes in PGraphicsJava2D)
|
||||
|
||||
Reference in New Issue
Block a user