From: stevenj Date: Wed, 2 Jun 2010 05:25:37 +0000 (-0400) Subject: no need for opt::reinit since we have = operator X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=16379b191d329058e08b5a695be923e40560ea1c;p=nlopt.git no need for opt::reinit since we have = operator darcs-hash:20100602052537-c8de0-526082e36d2563e1506b393e5564b7b0129a89d4.gz --- diff --git a/api/nlopt-in.hpp b/api/nlopt-in.hpp index 65cfde9..5e75ae6 100644 --- a/api/nlopt-in.hpp +++ b/api/nlopt-in.hpp @@ -125,12 +125,6 @@ namespace nlopt { if (!o) throw std::bad_alloc(); nlopt_set_free_f_data(o, 1); } - void reinit(algorithm a, unsigned n) { - if (o) nlopt_destroy(o); - o = nlopt_create(nlopt_algorithm(a), n); - if (!o) throw std::bad_alloc(); - nlopt_set_free_f_data(o, 1); - } opt(const opt& from) : o(nlopt_copy(from.o)) { if (from.o && !o) throw std::bad_alloc(); mythrow(nlopt_dup_f_data(o, sizeof(myfunc_data)));