From: stevenj Date: Mon, 30 Aug 2010 23:55:48 +0000 (-0400) Subject: add missing "inline" keywords to C++ functions so that nlopt.hpp can be included... X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=132a3a21357ead335ce5b036c4d49fc37718b6f3;p=nlopt.git add missing "inline" keywords to C++ functions so that nlopt.hpp can be included in multiple compilation units; thanks to Steve Jaffe for the bug report darcs-hash:20100830235548-c8de0-6d4a9c8ca4900c947b2d0f4361ab6da4756188fb.gz --- diff --git a/api/nlopt-in.hpp b/api/nlopt-in.hpp index ee76d97..22251a2 100644 --- a/api/nlopt-in.hpp +++ b/api/nlopt-in.hpp @@ -504,27 +504,27 @@ namespace nlopt { ////////////////////////////////////////////////////////////////////// - void srand(unsigned long seed) { nlopt_srand(seed); } - void srand_time() { nlopt_srand_time(); } - void version(int &major, int &minor, int &bugfix) { + inline void srand(unsigned long seed) { nlopt_srand(seed); } + inline void srand_time() { nlopt_srand_time(); } + inline void version(int &major, int &minor, int &bugfix) { nlopt_version(&major, &minor, &bugfix); } - int version_major() { + inline int version_major() { int major, minor, bugfix; nlopt_version(&major, &minor, &bugfix); return major; } - int version_minor() { + inline int version_minor() { int major, minor, bugfix; nlopt_version(&major, &minor, &bugfix); return minor; } - int version_bugfix() { + inline int version_bugfix() { int major, minor, bugfix; nlopt_version(&major, &minor, &bugfix); return bugfix; } - const char *algorithm_name(algorithm a) { + inline const char *algorithm_name(algorithm a) { return nlopt_algorithm_name(nlopt_algorithm(a)); }