Fixed array allocation syntax error and removed std namespace for VC6.0 users
This commit is contained in:
parent
963237b3fc
commit
2530b45005
|
@ -65,6 +65,9 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpInvert_00024MatrixOpDire
|
|||
jboolean transposeDest
|
||||
)
|
||||
{
|
||||
static float * temp_matrix = 0;
|
||||
static int temp_matrix_size = 0;
|
||||
|
||||
if (transposeSource == transposeDest)
|
||||
{
|
||||
transposeSource = JNI_FALSE;
|
||||
|
@ -85,7 +88,13 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpInvert_00024MatrixOpDire
|
|||
float * srcMatrix, * destMatrix;
|
||||
|
||||
int temp_side = source.width-1;
|
||||
float temp_matrix [temp_side*temp_side];
|
||||
|
||||
if (temp_matrix_size < temp_side) {
|
||||
if (temp_matrix)
|
||||
delete[] temp_matrix;
|
||||
temp_matrix = new float[temp_side * temp_side];
|
||||
temp_matrix_size = temp_side;
|
||||
}
|
||||
|
||||
for (int i = 0; i < source.elements; i++)
|
||||
{
|
||||
|
|
|
@ -68,6 +68,9 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpInvert_00024MatrixOpSafe
|
|||
)
|
||||
{
|
||||
|
||||
static float * temp_matrix = 0;
|
||||
static int temp_matrix_size = 0;
|
||||
|
||||
if (transposeSource == transposeDest)
|
||||
{
|
||||
transposeSource = JNI_FALSE;
|
||||
|
@ -85,7 +88,13 @@ JNIEXPORT void JNICALL Java_org_lwjgl_Math_00024MatrixOpInvert_00024MatrixOpSafe
|
|||
float * srcMatrix, * destMatrix;
|
||||
|
||||
int temp_side = source.width-1;
|
||||
float temp_matrix [temp_side*temp_side];
|
||||
|
||||
if (temp_matrix_size < temp_side) {
|
||||
if (temp_matrix)
|
||||
delete[] temp_matrix;
|
||||
temp_matrix = new float[temp_side * temp_side];
|
||||
temp_matrix_size = temp_side;
|
||||
}
|
||||
|
||||
for (int i = 0; i < source.elements; i++)
|
||||
{
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include "MatrixOpCommon.h"
|
||||
#include <cmath>
|
||||
|
||||
using namespace std;
|
||||
//using namespace std;
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_Math_MatrixOpNormalise_MatrixOpDirect
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#include "MatrixOpCommon.h"
|
||||
#include <cmath>
|
||||
|
||||
using namespace std;
|
||||
//using namespace std;
|
||||
|
||||
/*
|
||||
* Class: org_lwjgl_Math_MatrixOpNormalise_MatrixOpSafe
|
||||
|
|
Loading…
Reference in New Issue