MCPcopy Create free account
hub / github.com/Tencent/tgfx / MakeWithoutCopy

Method MakeWithoutCopy

src/core/Data.cpp:51–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51std::shared_ptr<Data> Data::MakeWithoutCopy(const void* data, size_t length) {
52 if (length == 0) {
53 return MakeEmpty();
54 }
55 auto byteData = new Data(data, length, nullptr, nullptr);
56 return std::shared_ptr<Data>(byteData);
57}
58
59void Data::DeleteProc(const void* data, void*) {
60 if (data != nullptr) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected