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:
parent
8c1e53f65a
commit
665c6d6699
@ -1419,14 +1419,14 @@ private:
|
|||||||
static inline U* create()
|
static inline U* create()
|
||||||
{
|
{
|
||||||
auto p = (Traits::malloc)(sizeof(U));
|
auto p = (Traits::malloc)(sizeof(U));
|
||||||
return p != nullptr ? new (p) U : nullptr;
|
return new (p) U;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename U, typename A1>
|
template<typename U, typename A1>
|
||||||
static inline U* create(A1&& a1)
|
static inline U* create(A1&& a1)
|
||||||
{
|
{
|
||||||
auto p = (Traits::malloc)(sizeof(U));
|
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>
|
template<typename U>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user