File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -37,22 +37,22 @@ struct weak_raw_ptr : public sigc::notifiable
37
37
inline weak_raw_ptr ()
38
38
: p_(nullptr )
39
39
{}
40
-
40
+
41
41
inline weak_raw_ptr (T* p) noexcept
42
42
: p_(p)
43
43
{
44
44
if (!p)
45
45
return ;
46
-
46
+
47
47
p->add_destroy_notify_callback (this , ¬ify_object_invalidated);
48
48
}
49
-
49
+
50
50
inline weak_raw_ptr (const weak_raw_ptr& src) noexcept
51
51
: p_(src.p_)
52
52
{
53
53
p_->add_destroy_notify_callback (this , ¬ify_object_invalidated);
54
54
}
55
-
55
+
56
56
inline weak_raw_ptr& operator =(const weak_raw_ptr& src) noexcept
57
57
{
58
58
if (p_) {
@@ -68,14 +68,14 @@ struct weak_raw_ptr : public sigc::notifiable
68
68
// TODO:
69
69
weak_raw_ptr (weak_raw_ptr&& src) = delete ;
70
70
weak_raw_ptr& operator =(weak_raw_ptr&& src) = delete ;
71
-
71
+
72
72
inline ~weak_raw_ptr () noexcept
73
73
{
74
74
if (p_) {
75
75
p_->remove_destroy_notify_callback (this );
76
76
}
77
77
}
78
-
78
+
79
79
inline explicit operator bool () const noexcept
80
80
{
81
81
return p_ != nullptr ;
@@ -98,7 +98,7 @@ struct weak_raw_ptr : public sigc::notifiable
98
98
99
99
self->p_ = nullptr ;
100
100
}
101
-
101
+
102
102
T* p_;
103
103
};
104
104
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ main(int argc, char* argv[])
35
35
// libsigc++ 2.10: 8
36
36
// libsigc++ 3.0: 8
37
37
std::cout << " trackable: " << sizeof (sigc::trackable) << std::endl;
38
-
38
+
39
39
// libsigc++ 2.10: 16
40
40
// libsigc++ 3.0: 16
41
41
std::cout << " slot<void()>: " << sizeof (sigc::slot<void ()>) << std::endl;
You can’t perform that action at this time.
0 commit comments