diff --git a/src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.cpp b/src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.cpp index 08fe495c..23e266f7 100644 --- a/src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.cpp +++ b/src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect.cpp @@ -74,8 +74,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpNormalise_00024MatrixOpD float * sourceRecord, * destRecord; float magnitude, magnitude_squared; - int i; - register int j; + int i, j; for (i = 0; i < source.elements; i++) { @@ -84,12 +83,12 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpNormalise_00024MatrixOpD sourceRecord = source.nextRecord(); destRecord = dest.nextRecord(); - for (j = 0 ; j < sourceWidth*sourceHeight; i++) + for (j = 0 ; j < sourceWidth*sourceHeight; j++) magnitude_squared += sourceRecord[j] * sourceRecord[j]; magnitude = (float) sqrt((double) magnitude_squared); - for (j = 0; j < sourceWidth*sourceHeight; i++) + for (j = 0; j < sourceWidth*sourceHeight; j++) destRecord[j] = sourceRecord[j] / magnitude; dest.writeRecord(); diff --git a/src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.cpp b/src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.cpp index 070c38e4..74979df9 100644 --- a/src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.cpp +++ b/src/native/win32/org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.cpp @@ -40,7 +40,7 @@ */ #include -#include "org_lwjgl_Math_MatrixOpSubtract_MatrixOpSafe.h" +#include "org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe.h" #include "MatrixOpCommon.h" #include @@ -72,22 +72,21 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpNormalise_00024MatrixOpS float * sourceRecord, * destRecord; float magnitude, magnitude_squared; - int i; - register int j; + int i, j; for (i = 0; i < source.elements; i++) { magnitude_squared = 0; sourceRecord = source.nextRecord(); - destRecord = dest.nextRecord(); + destRecord = dest.nextRecord(); - for (j = 0 ; j < sourceWidth*sourceHeight; i++) + for (j = 0 ; j < sourceWidth*sourceHeight; j++) magnitude_squared += sourceRecord[j] * sourceRecord[j]; magnitude = (float) sqrt((double) magnitude_squared); - for (j = 0; j < sourceWidth*sourceHeight; i++) + for (j = 0; j < sourceWidth*sourceHeight; j++) destRecord[j] = sourceRecord[j] / magnitude; dest.writeRecord();