Worked around a Mono bug with unsafe inline constructors.

This commit is contained in:
the_fiddler 2008-01-20 19:42:01 +00:00
parent 40f32f4867
commit 582d4fb569

View file

@ -89,10 +89,14 @@ namespace Examples
#region CombineHandler
unsafe double*[] combineData = new double*[16];
unsafe double*[] combineData;
int data_index = 0;
unsafe void CombineHandler(double[] coordinates, double*[] data, float[] weight, double** dataOut)
{
// Workaround Mono 1.2.6 bug with unsafe inline initializers
if (combineData == null)
combineData = new double*[16];
double* out_data = combineData[data_index] = (double*)Marshal.AllocHGlobal(6 * sizeof(double));
int i;