Repository : ssh://g18-sc-serv-04.diamond.ac.uk/cctbx
On branch : master
commit a31eb2bf0d5bb129425bb759466f45622c773fd4
Author: Robert Oeffner <rdo20@cam.ac.uk>
Date: Tue Apr 11 11:31:24 2017 +0100
Replacing illegal C++ code with proper dynamic array allocation.
a31eb2bf0d5bb129425bb759466f45622c773fd4
scitbx/lbfgs.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scitbx/lbfgs.h b/scitbx/lbfgs.h
index 41be8e8cc..f0000143d 100755
--- a/scitbx/lbfgs.h
+++ b/scitbx/lbfgs.h
@@ -917,9 +917,9 @@ namespace lbfgs {
int info = 5;
brackt = false;
FloatType sxnorm = std::sqrt(ddot(SizeType(n), sx, sx));
- FloatType pk[n];
- FloatType a_sum[n];
- FloatType akm1[n];
+ FloatType* pk = new FloatType[n];
+ FloatType* a_sum = new FloatType[n];
+ FloatType* akm1 = new FloatType[n];
for (SizeType i=0; i < n; i++) {
pk[i] = sx[i]/sxnorm;
akm1[i] = -gx[i]/sxnorm;