Skip to content

Commit

Permalink
Merge pull request #121 from b2renger/master
Browse files Browse the repository at this point in the history
Fix Table.insertRow
  • Loading branch information
codeanticode committed Jul 12, 2015
2 parents af7e141 + 7abbb04 commit 0a1e69f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core/src/processing/data/Table.java
Original file line number Diff line number Diff line change
Expand Up @@ -1855,35 +1855,35 @@ public void insertRow(int insert, Object[] columnData) {
case INT: {
int[] intTemp = new int[rowCount+1];
System.arraycopy(columns[col], 0, intTemp, 0, insert);
System.arraycopy(columns[col], insert, intTemp, insert+1, (rowCount - insert) + 1);
System.arraycopy(columns[col], insert, intTemp, insert+1, rowCount - insert);
columns[col] = intTemp;
break;
}
case LONG: {
long[] longTemp = new long[rowCount+1];
System.arraycopy(columns[col], 0, longTemp, 0, insert);
System.arraycopy(columns[col], insert, longTemp, insert+1, (rowCount - insert) + 1);
System.arraycopy(columns[col], insert, longTemp, insert+1, rowCount - insert);
columns[col] = longTemp;
break;
}
case FLOAT: {
float[] floatTemp = new float[rowCount+1];
System.arraycopy(columns[col], 0, floatTemp, 0, insert);
System.arraycopy(columns[col], insert, floatTemp, insert+1, (rowCount - insert) + 1);
System.arraycopy(columns[col], insert, floatTemp, insert+1, rowCount - insert);
columns[col] = floatTemp;
break;
}
case DOUBLE: {
double[] doubleTemp = new double[rowCount+1];
System.arraycopy(columns[col], 0, doubleTemp, 0, insert);
System.arraycopy(columns[col], insert, doubleTemp, insert+1, (rowCount - insert) + 1);
System.arraycopy(columns[col], insert, doubleTemp, insert+1, rowCount - insert);
columns[col] = doubleTemp;
break;
}
case STRING: {
String[] stringTemp = new String[rowCount+1];
System.arraycopy(columns[col], 0, stringTemp, 0, insert);
System.arraycopy(columns[col], insert, stringTemp, insert+1, (rowCount - insert) + 1);
System.arraycopy(columns[col], insert, stringTemp, insert+1, rowCount - insert);
columns[col] = stringTemp;
break;
}
Expand Down

0 comments on commit 0a1e69f

Please sign in to comment.