Skip to content

Commit

Permalink
AK: Decorate AK::NonnullOwnPtr::leak_ptr() with [[nodiscard]]
Browse files Browse the repository at this point in the history
  • Loading branch information
bgianfo authored and awesomekling committed Aug 5, 2020
1 parent fa625a2 commit f34fcde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AK/NonnullOwnPtr.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class NonnullOwnPtr {
return *this;
}

T* leak_ptr()
[[nodiscard]] T* leak_ptr()
{
return exchange(m_ptr, nullptr);
}
Expand Down

0 comments on commit f34fcde

Please sign in to comment.