Skip to content

Commit d3002a0

Browse files
authored
Update shared_pointer.hpp
Name correction: decrement_n_destroy() to decrement_and_destroy(). There's no decrement_n_destroy(), only decrement_and_destroy() is found.
1 parent 055f3fe commit d3002a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ch16/ex16.28/shared_pointer.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ namespace cp5
142142
{
143143
if (ptr != pointer)
144144
{
145-
decrement_n_destroy();
145+
decrement_and_destroy();
146146
ptr = pointer;
147147
ref_count = new std::size_t(1);
148148
}
@@ -178,4 +178,4 @@ namespace cp5
178178
ptr = nullptr;
179179
}
180180
};
181-
}//namespace
181+
}//namespace

0 commit comments

Comments
 (0)