Skip to content

Commit 0ac37bc

Browse files
authored
Merge pull request #5981 from Minimaximize/Liam/Processing-Fix-Array-Declaration
Replace C/C++ style array declarations with Java style array declarations
2 parents 83fe79d + f923be3 commit 0ac37bc

File tree

14 files changed

+303
-319
lines changed

14 files changed

+303
-319
lines changed

core/src/processing/awt/PGraphicsJava2D.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public class PGraphicsJava2D extends PGraphics {
8282
float[] curveDrawY;
8383

8484
int transformCount;
85-
AffineTransform transformStack[] =
85+
AffineTransform[] transformStack =
8686
new AffineTransform[MATRIX_STACK_DEPTH];
8787
double[] transform = new double[6];
8888

@@ -782,7 +782,7 @@ public void vertex(float x, float y) {
782782
//float vertex[];
783783

784784
if (vertexCount == vertices.length) {
785-
float temp[][] = new float[vertexCount<<1][VERTEX_FIELD_COUNT];
785+
float[][] temp = new float[vertexCount<<1][VERTEX_FIELD_COUNT];
786786
System.arraycopy(vertices, 0, temp, 0, vertexCount);
787787
vertices = temp;
788788
//message(CHATTER, "allocating more vertices " + vertices.length);
@@ -1959,7 +1959,7 @@ protected void handleTextSize(float size) {
19591959

19601960

19611961
@Override
1962-
protected float textWidthImpl(char buffer[], int start, int stop) {
1962+
protected float textWidthImpl(char[] buffer, int start, int stop) {
19631963
if (textFont == null) {
19641964
defaultFontOrDeath("textWidth");
19651965
}
@@ -2028,7 +2028,7 @@ protected float textWidthImpl(char buffer[], int start, int stop) {
20282028

20292029

20302030
@Override
2031-
protected void textLineImpl(char buffer[], int start, int stop,
2031+
protected void textLineImpl(char[] buffer, int start, int stop,
20322032
float x, float y) {
20332033
Font font = (Font) textFont.getNative();
20342034
// if (font != null && (textFont.isStream() || hints[ENABLE_NATIVE_FONTS])) {
@@ -2828,7 +2828,7 @@ public void updatePixels(int x, int y, int c, int d) {
28282828
// GET/SET
28292829

28302830

2831-
static int getset[] = new int[1];
2831+
static int[] getset = new int[1];
28322832

28332833

28342834
@Override

0 commit comments

Comments
 (0)