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

Function cloneUnique

external/jsoncpp/jsoncpp.cpp:2433–2439  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2431
2432template <typename T>
2433static std::unique_ptr<T> cloneUnique(const std::unique_ptr<T> &p) {
2434 std::unique_ptr<T> r;
2435 if (p) {
2436 r = std::unique_ptr<T>(new T(*p));
2437 }
2438 return r;
2439}
2440
2441// This is a walkaround to avoid the static initialization of Value::null.
2442// 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