diff options
author | Marcin Kolny <marcin.kolny@gmail.com> | 2015-08-08 14:45:12 +0200 |
---|---|---|
committer | Marcin Kolny <marcin.kolny@gmail.com> | 2015-08-08 14:45:59 +0200 |
commit | 0d5f63b18f5766760cf39e82ee11482984e0a938 (patch) | |
tree | e3f74b9b37e7618c92840024077dff43e6d08f0d /examples/thread/dispatcher.cc | |
parent | dce7a844e48a582e42eb2b60eef5c1f2527540ac (diff) | |
parent | d94115843f38967b5e883f5f7d8057882ae364cb (diff) | |
download | glibmm-gir-gmmproc.tar.gz |
Merge branch 'master' into glibmm-gir-gmmprocglibmm-gir-gmmproc
Diffstat (limited to 'examples/thread/dispatcher.cc')
-rw-r--r-- | examples/thread/dispatcher.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/thread/dispatcher.cc b/examples/thread/dispatcher.cc index 21833e7f..e58cb227 100644 --- a/examples/thread/dispatcher.cc +++ b/examples/thread/dispatcher.cc @@ -29,7 +29,7 @@ namespace class ThreadProgress { public: - explicit ThreadProgress(int id); + explicit ThreadProgress(int the_id); virtual ~ThreadProgress(); int id() const; @@ -78,10 +78,10 @@ public: void operator()(T ptr) const { delete ptr; } }; -ThreadProgress::ThreadProgress(int id) +ThreadProgress::ThreadProgress(int the_id) : - thread_ (0), - id_ (id), + thread_ (nullptr), + id_ (the_id), progress_ (0) { // Connect to the cross-thread signal. @@ -91,7 +91,7 @@ ThreadProgress::ThreadProgress(int id) ThreadProgress::~ThreadProgress() { // It is an error if the thread is still running at this point. - g_return_if_fail(thread_ == 0); + g_return_if_fail(thread_ == nullptr); } int ThreadProgress::id() const @@ -134,7 +134,7 @@ void ThreadProgress::thread_function() { Glib::Rand rand; - for (int i = 0; i < ITERATIONS; ++i) + for (auto i = 0; i < ITERATIONS; ++i) { Glib::usleep(rand.get_int_range(2000, 20000)); |