Skip to content

Commit 0b90cae

Browse files
committed
adopt for new compiler version
1 parent 7635b43 commit 0b90cae

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

source/mir/optim/fit_splie.d

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ FitSplineResult!T fitSpline(alias d = "a - b", T)(
4545
if (points.length < x.length && lambda == 0)
4646
{
4747
static immutable exc = new Exception("fitSpline: points.length has to be greater or equal x.length when lambda is 0.0");
48-
throw exc;
48+
throw cast()exc;
4949
}
5050

5151
FitSplineResult!T ret;

source/mir/optim/least_squares.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@ LeastSquaresResult!T optimize(alias f, alias g = null, alias tm = null, T)(
173173
{
174174
auto ret = optimizeLeastSquares!(f, g, tm, T)(settings, m, x, l, u);
175175
if (ret.status == -1)
176-
throw leastSquaresException_maxIterations;
176+
throw cast()leastSquaresException_maxIterations;
177177
else
178178
if (ret.status < -1)
179-
throw leastSquaresExceptions[ret.status + 32];
179+
throw cast()leastSquaresExceptions[ret.status + 32];
180180
return ret;
181181
}
182182

0 commit comments

Comments
 (0)