MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / create

Function create

Source/external/json.hpp:19551–19569  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19549 /// @}
19550
19551 private:
19552
19553 /// helper for exception-safe object creation
19554 template<typename T, typename... Args>
19555 JSON_HEDLEY_RETURNS_NON_NULL
19556 static T* create(Args&& ... args)
19557 {
19558 AllocatorType<T> alloc;
19559 using AllocatorTraits = std::allocator_traits<AllocatorType<T>>;
19560
19561 auto deleter = [&](T * obj)
19562 {
19563 AllocatorTraits::deallocate(alloc, obj, 1);
19564 };
19565 std::unique_ptr<T, decltype(deleter)> obj(AllocatorTraits::allocate(alloc, 1), deleter);
19566 AllocatorTraits::construct(alloc, obj.get(), std::forward<Args>(args)...);
19567 JSON_ASSERT(obj != nullptr);
19568 return obj.release();
19569 }
19570
19571 ////////////////////////
19572 // JSON value storage //

Callers 15

sceneMethod · 0.85
onEnterMethod · 0.85
initMethod · 0.85
updateBGColorMethod · 0.85
initMethod · 0.85
initMethod · 0.85
initMethod · 0.85
sceneMethod · 0.85
initMethod · 0.85
createMethod · 0.85
initWithTextMethod · 0.85
initWithSpriteMethod · 0.85

Calls 1

getMethod · 0.80

Tested by

no test coverage detected