From 16379b191d329058e08b5a695be923e40560ea1c Mon Sep 17 00:00:00 2001 From: stevenj Date: Wed, 2 Jun 2010 01:25:37 -0400 Subject: [PATCH] no need for opt::reinit since we have = operator darcs-hash:20100602052537-c8de0-526082e36d2563e1506b393e5564b7b0129a89d4.gz --- api/nlopt-in.hpp | 6 ------ 1 file changed, 6 deletions(-) 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))); -- 2.30.2