Remove unnecessary null pointer checks.
This commit is contained in:
parent
19d93672b0
commit
027a524907
@ -139,12 +139,8 @@ asio::error_code winrt_ssocket_service_base::close(
|
|||||||
winrt_ssocket_service_base::base_implementation_type& impl,
|
winrt_ssocket_service_base::base_implementation_type& impl,
|
||||||
asio::error_code& ec)
|
asio::error_code& ec)
|
||||||
{
|
{
|
||||||
if (impl.socket_)
|
|
||||||
{
|
|
||||||
delete impl.socket_;
|
delete impl.socket_;
|
||||||
impl.socket_ = nullptr;
|
impl.socket_ = nullptr;
|
||||||
}
|
|
||||||
|
|
||||||
ec = asio::error_code();
|
ec = asio::error_code();
|
||||||
return ec;
|
return ec;
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,6 @@ public:
|
|||||||
~thread_info_base()
|
~thread_info_base()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < max_mem_index; ++i)
|
for (int i = 0; i < max_mem_index; ++i)
|
||||||
if (reusable_memory_[i])
|
|
||||||
::operator delete(reusable_memory_[i]);
|
::operator delete(reusable_memory_[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user