From f036bfce69ffef18ce4e15a2af7e1e5fc10a6846 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 12 Jul 2017 22:20:58 +0100 Subject: Remove the need for non-inline options classes to be explicitly regisitered --- icetray/icetray/options.h | 1 + icetray/unittests/testOptions.cpp | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/icetray/icetray/options.h b/icetray/icetray/options.h index 15c4740..349959c 100644 --- a/icetray/icetray/options.h +++ b/icetray/icetray/options.h @@ -57,6 +57,7 @@ namespace IceTray { #define ICETRAY_OPTIONS_INLINE(OptsDef) \ void ICETRAY_OPTIONS_FUNC ICETRAY_OPTIONS_BODY(OptsDef) #define ICETRAY_OPTIONS(Class, OptsDef) \ + FACTORY(Class, IceTray::OptionsFactory); \ void Class::ICETRAY_OPTIONS_FUNC ICETRAY_OPTIONS_BODY(OptsDef) #endif diff --git a/icetray/unittests/testOptions.cpp b/icetray/unittests/testOptions.cpp index a205755..af5151c 100644 --- a/icetray/unittests/testOptions.cpp +++ b/icetray/unittests/testOptions.cpp @@ -10,8 +10,6 @@ ICETRAY_OPTIONS(TestOptions, ("vec", boost::program_options::value(&testVec), "vector") ); -FACTORY(TestOptions, IceTray::OptionsFactory); - class TestOptionsInline : public IceTray::Options { public: TestOptionsInline() : IceTray::Options("Test options inline") -- cgit v1.2.3