From: ehofman Date: Wed, 24 Sep 2003 19:06:59 +0000 (+0000) Subject: Fix a problem where the compiler would mix up two function declarations because the... X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7ae57483f39a6c60703921d930d3bd2bce198f39;p=simgear.git Fix a problem where the compiler would mix up two function declarations because the one wich has SGSubsystem in it's options list expected a const SGSubsystem, but it was called with a plain SGSubsystem --- diff --git a/simgear/structure/event_mgr.cxx b/simgear/structure/event_mgr.cxx index 979420d7..9ffb184b 100644 --- a/simgear/structure/event_mgr.cxx +++ b/simgear/structure/event_mgr.cxx @@ -71,12 +71,12 @@ SGEvent::SGEvent( const char* name, } SGEvent::SGEvent( const char* name, - const SGSubsystem* subsystem, + SGSubsystem* subsystem, interval_type repeat_value, interval_type initial_value ) : _name(name), _callback(NULL), - _subsystem((SGSubsystem*)&subsystem), + _subsystem(subsystem), _repeat_value(repeat_value), _initial_value(initial_value), _cum_time(0), diff --git a/simgear/structure/event_mgr.hxx b/simgear/structure/event_mgr.hxx index bcfd2d25..73cac934 100644 --- a/simgear/structure/event_mgr.hxx +++ b/simgear/structure/event_mgr.hxx @@ -71,7 +71,7 @@ public: interval_type initial_value ); SGEvent( const char* desc, - const SGSubsystem* subsystem, + SGSubsystem* subsystem, interval_type repeat_value, interval_type initial_value ); @@ -176,7 +176,7 @@ public: * -1 means run immediately. */ inline void add( const char* name, - const SGSubsystem* subsystem, + SGSubsystem* subsystem, interval_type repeat_value, interval_type initial_value = -1 ) {