[glibmm] Correct bad uses of sigc::bind<1>.



commit 2a396bf2450a666d12d918d0ded79113bea4a28d
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Mar 2 22:05:35 2016 +0100

    Correct bad uses of sigc::bind<1>.
    
    sigc::bind<1>() is meant to bind a value for the second argument,
    which makes no sense for a method with 1 parameter.
    sigc::bind() seems fine.
    
    I found this while working in the sigc3 branch, using libsigc++-3.0,
    which is less forgiving of this error.

 examples/thread/dispatcher.cc |    2 +-
 examples/thread/threadpool.cc |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/examples/thread/dispatcher.cc b/examples/thread/dispatcher.cc
index 9f0f56e..ae9e084 100644
--- a/examples/thread/dispatcher.cc
+++ b/examples/thread/dispatcher.cc
@@ -161,7 +161,7 @@ Application::Application() : main_loop_(Glib::MainLoop::create()), progress_thre
       progress_threads_[i] = progress;
 
       progress->signal_finished().connect(
-        sigc::bind<1>(sigc::mem_fun(*this, &Application::on_progress_finished), progress));
+        sigc::bind(sigc::mem_fun(*this, &Application::on_progress_finished), progress));
     }
   }
   catch (...)
diff --git a/examples/thread/threadpool.cc b/examples/thread/threadpool.cc
index 891c565..885962b 100644
--- a/examples/thread/threadpool.cc
+++ b/examples/thread/threadpool.cc
@@ -56,7 +56,7 @@ main(int, char**)
 
   for (auto c = 'a'; c <= 'z'; ++c)
   {
-    pool.push(sigc::bind<1>(sigc::ptr_fun(&print_char), c));
+    pool.push(sigc::bind(sigc::ptr_fun(&print_char), c));
   }
 
   pool.shutdown();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]