[glibmm/sigc3] sigc++-3.0: Correct bad uses of sigc::bind<1>.



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

    sigc++-3.0: Correct bad uses of sigc::bind<1>.
    
    sigc::bind<1>() is meant t bind a value for the second argument,
    which makes no sense for a method with 1 parameter.
    sigc::bind() seems fine.

 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]