chiark
/
gitweb
/
~ianmdlvl
/
nlopt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa7ec60
)
deprecated API should support xtol_abs==NULL (for 0 tol) for backward compatibility
author
stevenj
<stevenj@alum.mit.edu>
Tue, 7 Dec 2010 20:18:02 +0000
(15:18 -0500)
committer
stevenj
<stevenj@alum.mit.edu>
Tue, 7 Dec 2010 20:18:02 +0000
(15:18 -0500)
darcs-hash:
20101207201802
-c8de0-
d0e23236914bbfae02d15c5f0c3ee61361a9da79
.gz
api/deprecated.c
patch
|
blob
|
history
diff --git
a/api/deprecated.c
b/api/deprecated.c
index 54da189970625c7da09f2901d5db5d239d4749da..1f7dde91bc48247b3697f3b84850a82618b96f29 100644
(file)
--- 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);