MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / cloneUnique

Function cloneUnique

Sources/Dependencies/jsoncpp/value.cpp:56–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54{
55 template <typename T>
56 static std::unique_ptr<T> cloneUnique(const std::unique_ptr<T>& p) {
57 std::unique_ptr<T> r;
58 if (p) {
59 r = std::unique_ptr<T>(new T(*p));
60 }
61 return r;
62 }
63
64 // This is a walkaround to avoid the static initialization of Value::null.
65 // kNull must be word-aligned to avoid crashing on ARM. We use an alignment of

Callers 2

CommentsMethod · 0.85
value.cppFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected