summaryrefslogtreecommitdiff
path: root/examples/thread
diff options
context:
space:
mode:
Diffstat (limited to 'examples/thread')
-rw-r--r--examples/thread/dispatcher.cc2
-rw-r--r--examples/thread/thread.cc2
-rw-r--r--examples/thread/threadpool.cc4
3 files changed, 4 insertions, 4 deletions
diff --git a/examples/thread/dispatcher.cc b/examples/thread/dispatcher.cc
index 1c1eb667..79ff64bc 100644
--- a/examples/thread/dispatcher.cc
+++ b/examples/thread/dispatcher.cc
@@ -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));
diff --git a/examples/thread/thread.cc b/examples/thread/thread.cc
index ad7cfebd..6fb546c1 100644
--- a/examples/thread/thread.cc
+++ b/examples/thread/thread.cc
@@ -36,7 +36,7 @@ void MessageQueue::producer()
{
Glib::Rand rand (1234);
- for(int i = 0; i < 200; ++i)
+ for(auto i = 0; i < 200; ++i)
{
{
Glib::Threads::Mutex::Lock lock (mutex_);
diff --git a/examples/thread/threadpool.cc b/examples/thread/threadpool.cc
index 632a77af..557997f4 100644
--- a/examples/thread/threadpool.cc
+++ b/examples/thread/threadpool.cc
@@ -15,7 +15,7 @@ void print_char(char c)
{
Glib::Rand rand;
- for(int i = 0; i < 100; ++i)
+ for(auto i = 0; i < 100; ++i)
{
{
Glib::Threads::Mutex::Lock lock (mutex);
@@ -33,7 +33,7 @@ int main(int, char**)
{
Glib::ThreadPool pool (10);
- for(char c = 'a'; c <= 'z'; ++c)
+ for(auto c = 'a'; c <= 'z'; ++c)
{
pool.push(sigc::bind<1>(sigc::ptr_fun(&print_char), c));
}