[libsigcplusplus] benchmark: Use the newer syntax.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libsigcplusplus] benchmark: Use the newer syntax.
- Date: Wed, 20 Apr 2016 09:47:55 +0000 (UTC)
commit 0433b5eb36c906310a910c5bfc652cee3c4bbda0
Author: Murray Cumming <murrayc murrayc com>
Date: Wed Apr 20 10:44:35 2016 +0200
benchmark: Use the newer syntax.
tests/benchmark.cc | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
---
diff --git a/tests/benchmark.cc b/tests/benchmark.cc
index 9c80de3..fe44210 100644
--- a/tests/benchmark.cc
+++ b/tests/benchmark.cc
@@ -25,11 +25,11 @@ int foo::bar(int a)
void test_slot_call()
{
foo foobar1;
- sigc::signal<int,int>::iterator it;
+ sigc::signal<int(int)>::iterator it;
// slot benchmark ...
- sigc::slot<int,int> slot = sigc::mem_fun(&foobar1, &foo::bar);
+ sigc::slot<int(int)> slot = sigc::mem_fun(foobar1, &foo::bar);
std::cout << "elapsed time for calling a slot " << COUNT << " times:" << std::endl;.
boost::timer::auto_cpu_timer timer;
@@ -40,7 +40,7 @@ void test_slot_call()
void test_signal_emit()
{
- sigc::signal<int,int> emitter;
+ sigc::signal<int(int)> emitter;
Glib::TimeVal t1, t2;
t1.assign_current_time();
@@ -57,8 +57,8 @@ void test_signal_emit()
void test_connected_signal_emit()
{
foo foobar1;
- sigc::signal<int,int> emitter;
- emitter.connect(mem_fun(&foobar1, &foo::bar));
+ sigc::signal<int(int)> emitter;
+ emitter.connect(mem_fun(foobar1, &foo::bar));
Glib::TimeVal t1, t2;
t1.assign_current_time();
@@ -76,11 +76,11 @@ void test_connected_multiple_signal_emit()
{
foo foobar1, foobar2, foobar3, foobar4, foobar5;
- sigc::signal<int,int> emitter;
- emitter.connect(mem_fun(&foobar2, &foo::bar));
- emitter.connect(mem_fun(&foobar3, &foo::bar));
- emitter.connect(mem_fun(&foobar4, &foo::bar));
- emitter.connect(mem_fun(&foobar5, &foo::bar));
+ sigc::signal<int(int)> emitter;
+ emitter.connect(mem_fun(foobar2, &foo::bar));
+ emitter.connect(mem_fun(foobar3, &foo::bar));
+ emitter.connect(mem_fun(foobar4, &foo::bar));
+ emitter.connect(mem_fun(foobar5, &foo::bar));
Glib::TimeVal t1, t2;
t1.assign_current_time();
@@ -97,15 +97,15 @@ void test_connected_multiple_signal_emit()
void test_connect_disconnect()
{
foo foobar1;
- sigc::signal<int, int> emitter;
- sigc::signal<int, int>::iterator it;
+ sigc::signal<int(int)> emitter;
+ sigc::signal<int(int)>::iterator it;
Glib::TimeVal t1, t2;
t1.assign_current_time();
for (int i=0; i < COUNT; ++i)
{
- it = emitter.connect(mem_fun(&foobar1, &foo::bar));
+ it = emitter.connect(mem_fun(foobar1, &foo::bar));
it->disconnect();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]