1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Don't check for allocation validity.

Will fail anyway right afterwards, if nullptr.
This commit is contained in:
Bartosz Taudul 2020-05-16 16:40:25 +02:00
parent 8c1e53f65a
commit 665c6d6699

View File

@ -1419,14 +1419,14 @@ private:
static inline U* create()
{
auto p = (Traits::malloc)(sizeof(U));
return p != nullptr ? new (p) U : nullptr;
return new (p) U;
}
template<typename U, typename A1>
static inline U* create(A1&& a1)
{
auto p = (Traits::malloc)(sizeof(U));
return p != nullptr ? new (p) U(std::forward<A1>(a1)) : nullptr;
return new (p) U(std::forward<A1>(a1));
}
template<typename U>