Bug 1248851 part 4 - Mark UniquePtr::release() MOZ_WARN_UNUSED_RESULT. r=Waldo

MozReview-Commit-ID: FH7t5gZ0nVG
This commit is contained in:
Xidorn Quan 2016-02-20 11:06:25 +08:00
parent 5e0ce8d9dc
commit 03da623f22

View File

@ -294,7 +294,7 @@ public:
DeleterType& getDeleter() { return del(); }
const DeleterType& getDeleter() const { return del(); }
Pointer release()
MOZ_WARN_UNUSED_RESULT Pointer release()
{
Pointer p = ptr();
ptr() = nullptr;
@ -429,7 +429,7 @@ public:
DeleterType& getDeleter() { return mTuple.second(); }
const DeleterType& getDeleter() const { return mTuple.second(); }
Pointer release()
MOZ_WARN_UNUSED_RESULT Pointer release()
{
Pointer p = mTuple.first();
mTuple.first() = nullptr;