Skip to content

Commit 4a94afa

Browse files
committed
scoped_connection: Remaining minor fixes
1 parent 5f49a42 commit 4a94afa

File tree

7 files changed

+9
-5
lines changed

7 files changed

+9
-5
lines changed

sigc++/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
set (SOURCE_FILES
1818
connection.cc
19+
scoped_connection.cc
1920
signal_base.cc
2021
trackable.cc
2122
functors/slot_base.cc

sigc++/connection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ namespace sigc
4444
* sigc::connection doesnʼt disconnect the slot automatically upon destruction.
4545
* You do not need to keep the sigc::connection object to retain the connection
4646
* of the slot to the signal. See also @ref sigc::scoped_connection, which does
47-
* diconnect automatically when the connection object is destroyed or replaced.
47+
* disconnect automatically when the connection object is destroyed or replaced.
4848
*
4949
* @ingroup signal
5050
*/

sigc++/filelist.am

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ sigc_public_h = \
2424
member_method_trait.h \
2525
reference_wrapper.h \
2626
retype_return.h \
27-
scoped_connection.h \
27+
scoped_connection.h \
2828
signal.h \
2929
signal_base.h \
3030
slot.h \
@@ -59,6 +59,7 @@ sigc_public_h = \
5959
functors/slot_base.h
6060

6161
sigc_sources_cc = \
62+
scoped_connection.cc \
6263
signal_base.cc \
6364
trackable.cc \
6465
connection.cc \

sigc++/scoped_connection.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ scoped_connection::operator bool() const noexcept
102102
// Swapping can be noexcept, as it does not need to disconnect either connection
103103
// because they will still stay alive, just in opposite instances post-swapping.
104104
void
105-
swap(scoped_connection &sca, scoped_connection &scb) noexcept
105+
swap(scoped_connection& sca, scoped_connection& scb) noexcept
106106
{
107107
using std::swap;
108108
swap(sca.conn_, scb.conn_);

sigc++/scoped_connection.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ struct SIGC_API scoped_connection final
118118
scoped_connection& operator=(scoped_connection&& sc);
119119

120120
/// Swap two scoped connections.
121-
friend void swap(scoped_connection &sca, scoped_connection &scb) noexcept;
121+
friend void swap(scoped_connection& sca, scoped_connection& scb) noexcept;
122122

123123
/// scoped_connection disconnects the referred slot, if any, upon destruction.
124124
~scoped_connection();
@@ -168,7 +168,7 @@ struct SIGC_API scoped_connection final
168168
sigc::connection conn_;
169169
};
170170

171-
void swap(scoped_connection &sca, scoped_connection &scb) noexcept;
171+
void swap(scoped_connection& sca, scoped_connection& scb) noexcept;
172172

173173
} /* namespace sigc */
174174

tests/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ set (TEST_SOURCE_FILES
4040
test_retype.cc
4141
test_retype_return.cc
4242
test_rvalue_ref.cc
43+
test_scoped_connection.cc
4344
test_signal.cc
4445
test_signal_move.cc
4546
test_size.cc

tests/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ test_ptr_fun_SOURCES = test_ptr_fun.cc $(sigc_test_util)
9393
test_retype_SOURCES = test_retype.cc $(sigc_test_util)
9494
test_retype_return_SOURCES = test_retype_return.cc $(sigc_test_util)
9595
test_rvalue_ref_SOURCES = test_rvalue_ref.cc $(sigc_test_util)
96+
test_scoped_connection_SOURCES = test_scoped_connection.cc $(sigc_test_util)
9697
test_signal_SOURCES = test_signal.cc $(sigc_test_util)
9798
test_signal_move_SOURCES = test_signal_move.cc $(sigc_test_util)
9899
test_size_SOURCES = test_size.cc $(sigc_test_util)

0 commit comments

Comments
 (0)