mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
Change ClockObject to a regular pointer, to avoid static init issues
This commit is contained in:
parent
793665d2a6
commit
de2d36f073
@ -22,7 +22,7 @@ void (*ClockObject::_start_clock_wait)() = ClockObject::dummy_clock_wait;
|
|||||||
void (*ClockObject::_start_clock_busy_wait)() = ClockObject::dummy_clock_wait;
|
void (*ClockObject::_start_clock_busy_wait)() = ClockObject::dummy_clock_wait;
|
||||||
void (*ClockObject::_stop_clock_wait)() = ClockObject::dummy_clock_wait;
|
void (*ClockObject::_stop_clock_wait)() = ClockObject::dummy_clock_wait;
|
||||||
|
|
||||||
PT(ClockObject) ClockObject::_global_clock;
|
ClockObject *ClockObject::_global_clock;
|
||||||
TypeHandle ClockObject::_type_handle;
|
TypeHandle ClockObject::_type_handle;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -595,6 +595,7 @@ make_global_clock() {
|
|||||||
|
|
||||||
_global_clock = new ClockObject;
|
_global_clock = new ClockObject;
|
||||||
_global_clock->set_mode(clock_mode);
|
_global_clock->set_mode(clock_mode);
|
||||||
|
_global_clock->ref();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -166,7 +166,7 @@ private:
|
|||||||
typedef CycleDataWriter<CData> CDWriter;
|
typedef CycleDataWriter<CData> CDWriter;
|
||||||
typedef CycleDataStageReader<CData> CDStageReader;
|
typedef CycleDataStageReader<CData> CDStageReader;
|
||||||
|
|
||||||
static PT(ClockObject) _global_clock;
|
static ClockObject *_global_clock;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static TypeHandle get_class_type() {
|
static TypeHandle get_class_type() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user