MCPcopy Create free account
hub / github.com/Samsung/ONE / cloneUnique

Function cloneUnique

runtime/3rdparty/jsoncpp/jsoncpp.cpp:2688–2696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2686namespace Json
2687{
2688template <typename T> static std::unique_ptr<T> cloneUnique(const std::unique_ptr<T> &p)
2689{
2690 std::unique_ptr<T> r;
2691 if (p)
2692 {
2693 r = std::unique_ptr<T>(new T(*p));
2694 }
2695 return r;
2696}
2697
2698// This is a walkaround to avoid the static initialization of Value::null.
2699// kNull must be word-aligned to avoid crashing on ARM. We use an alignment of

Callers 2

CommentsMethod · 0.85
jsoncpp.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected