From 132a3a21357ead335ce5b036c4d49fc37718b6f3 Mon Sep 17 00:00:00 2001 From: stevenj Date: Mon, 30 Aug 2010 19:55:48 -0400 Subject: [PATCH] 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 --- api/nlopt-in.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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)); } -- 2.30.2