From f73aa5488f1321b4b4112d58b87e877c4d99899b Mon Sep 17 00:00:00 2001 From: stevenj Date: Tue, 7 Dec 2010 15:18:02 -0500 Subject: [PATCH] deprecated API should support xtol_abs==NULL (for 0 tol) for backward compatibility darcs-hash:20101207201802-c8de0-d0e23236914bbfae02d15c5f0c3ee61361a9da79.gz --- api/deprecated.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/deprecated.c b/api/deprecated.c index 54da189..1f7dde9 100644 --- a/api/deprecated.c +++ b/api/deprecated.c @@ -119,7 +119,7 @@ NLOPT_STDCALL nlopt_minimize_econstrained( ret = nlopt_set_xtol_rel(opt, xtol_rel); if (ret != NLOPT_SUCCESS) { nlopt_destroy(opt); return ret; } - ret = nlopt_set_xtol_abs(opt, xtol_abs); + if (xtol_abs) ret = nlopt_set_xtol_abs(opt, xtol_abs); if (ret != NLOPT_SUCCESS) { nlopt_destroy(opt); return ret; } ret = nlopt_set_maxeval(opt, maxeval); -- 2.30.2