From c11557316da8ac034c038da072e5879aee517577 Mon Sep 17 00:00:00 2001 From: Edward d'Auvergne Date: Tue, 8 May 2018 10:17:34 +0200 Subject: [PATCH] SGSubsystemMgr: Changed the Registrant class argument order. The updateInterval argument is used a lot less than the dependency list, so these have been swapped. That simplifies the registration code in the subsystem implementations as the updateInterval default of 0.0 no longer need to be supplied. --- simgear/structure/subsystem_mgr.hxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/simgear/structure/subsystem_mgr.hxx b/simgear/structure/subsystem_mgr.hxx index 708f2ee4..a8e99f69 100644 --- a/simgear/structure/subsystem_mgr.hxx +++ b/simgear/structure/subsystem_mgr.hxx @@ -616,8 +616,9 @@ public: class Registrant { public: - Registrant(GroupType group = GENERAL, double updateInterval = 0.0, - std::initializer_list deps = {}) + Registrant(GroupType group = GENERAL, + std::initializer_list deps = {}, + double updateInterval = 0.0) { SubsystemFactoryFunctor factory = [](){ return new T; }; SGSubsystemMgr::registerSubsystem(T::staticSubsystemClassId(), @@ -634,8 +635,8 @@ public: { public: InstancedRegistrant(GroupType group = GENERAL, - double updateInterval = 0.0, - std::initializer_list deps = {}) + std::initializer_list deps = {}, + double updateInterval = 0.0) { SubsystemFactoryFunctor factory = [](){ return new T; }; SGSubsystemMgr::registerSubsystem(T::staticSubsystemClassId(),