MCPcopy Create free account
hub / github.com/Kitware/VTK / cloneUnique

Function cloneUnique

ThirdParty/jsoncpp/vtkjsoncpp/jsoncpp.cpp:2490–2496  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2488namespace Json {
2489template <typename T>
2490static std::unique_ptr<T> cloneUnique(const std::unique_ptr<T>& p) {
2491 std::unique_ptr<T> r;
2492 if (p) {
2493 r = std::unique_ptr<T>(new T(*p));
2494 }
2495 return r;
2496}
2497
2498// This is a walkaround to avoid the static initialization of Value::null.
2499// 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