Skip to content

Commit 0f68852

Browse files
committed
Silence unused-variable warnings in reset()
1 parent 7ac7349 commit 0f68852

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/oup/observable_unique_ptr.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,8 @@ class observable_unique_ptr_base {
361361
/** \param ptr A `nullptr_t` instance
362362
*/
363363
void reset(std::nullptr_t ptr = nullptr) noexcept {
364+
static_cast<void>(ptr); // silence "unused variable" warnings
365+
364366
if (ptr_deleter.data) {
365367
delete_and_pop_ref_();
366368
block = nullptr;

0 commit comments

Comments
 (0)