Skip to content

Commit

Permalink
Thread.h: fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Nekotekina committed Mar 21, 2020
1 parent ad552c6 commit 49d8731
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Utilities/Thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,10 @@ class named_thread final : public Context, result_storage_t<Context>, thread_bas
{
auto tls_error_cb = []()
{
const auto _this = thread_ctrl::get_current();

if constexpr (!result::empty)
{
// Construct using default constructor in the case of failure
new (static_cast<result*>(static_cast<named_thread*>(_this))->get()) typename result::type();
new (static_cast<result*>(static_cast<named_thread*>(thread_ctrl::get_current()))->get()) typename result::type();
}
};

Expand Down

0 comments on commit 49d8731

Please sign in to comment.