Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary null pointer checks. #1110

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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