Skip to content

Commit

Permalink
Merge pull request #1110 from elfring/Remove_unnecessary_null_pointer…
Browse files Browse the repository at this point in the history
…_checks

Remove unnecessary null pointer checks.
  • Loading branch information
hkaiser committed Apr 7, 2014
2 parents 8e90b77 + 6291c18 commit cd7d32f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
3 changes: 1 addition & 2 deletions hpx/util/coroutine/detail/context_base.hpp
Expand Up @@ -177,8 +177,7 @@ namespace hpx { namespace util { namespace coroutines { namespace detail
m_phase = 0;
#endif
#if HPX_THREAD_MAINTAIN_THREAD_DATA
if (m_thread_data)
delete_tss_storage(m_thread_data);
delete_tss_storage(m_thread_data);
#endif
}

Expand Down
7 changes: 2 additions & 5 deletions hpx/util/merging_map.hpp
Expand Up @@ -207,11 +207,8 @@ struct merging_map : boost::noncopyable
pointer p
) const
{
if (p)
{
delete p;
p = 0;
}
delete p;
p = 0;
}
};

Expand Down
4 changes: 1 addition & 3 deletions hpx/util/thread_specific_ptr.hpp
Expand Up @@ -62,9 +62,7 @@ namespace hpx { namespace util
T* new_value = 0
)
{
if (0 != ptr_) //-V809
delete ptr_;

delete ptr_;
ptr_ = new_value;
}

Expand Down

0 comments on commit cd7d32f

Please sign in to comment.