diff options
author | Murray Cumming <murrayc@src.gnome.org> | 2003-10-18 16:05:18 +0000 |
---|---|---|
committer | Murray Cumming <murrayc@src.gnome.org> | 2003-10-18 16:05:18 +0000 |
commit | c11242deac719dc04995f76e3d94332c7bfcd48a (patch) | |
tree | dd798c149984beac09c121aebe6bbb87a5dc91a7 /examples/thread/dispatcher2.cc | |
parent | a5382e1c4265c03bf7c0178fdc5562aa8982092b (diff) | |
download | glibmm-c11242deac719dc04995f76e3d94332c7bfcd48a.tar.gz |
minor example code cleanup
Diffstat (limited to 'examples/thread/dispatcher2.cc')
-rw-r--r-- | examples/thread/dispatcher2.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/examples/thread/dispatcher2.cc b/examples/thread/dispatcher2.cc index 0174fe64..70e65ab5 100644 --- a/examples/thread/dispatcher2.cc +++ b/examples/thread/dispatcher2.cc @@ -39,7 +39,9 @@ public: void launch(); void signal_finished_emit(); void print() const; - static SigC::Signal0<void>& signal_end(); + + typedef SigC::Signal0<void> type_signal_end; + static type_signal_end& signal_end(); private: unsigned int time_; @@ -50,7 +52,7 @@ private: Glib::Cond startup_cond_; Glib::Thread* thread_; - static SigC::Signal0<void> signal_end_; + static type_signal_end signal_end_; void timer_increment(); bool timeout_handler(); @@ -58,6 +60,7 @@ private: void thread_function(); }; +//TODO: Rename to avoid confusion with Glib::Dispatcher. murrayc class Dispatcher : public SigC::Object { public: @@ -182,8 +185,8 @@ void ThreadTimer::thread_function() mainloop->run(); } -// static -SigC::Signal0<void> ThreadTimer::signal_end_; +// initialize static member: +ThreadTimer::type_signal_end ThreadTimer::signal_end_; Dispatcher::Dispatcher() : |