MCPcopy Create free account
hub / github.com/axmolengine/axmol / LoadFileAsBytes

Method LoadFileAsBytes

tests/live2d-tests/Source/LAppPal.cpp:15–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13using namespace ax;
14
15csmByte* LAppPal::LoadFileAsBytes(const csmChar* filePath, csmSizeInt* outSize)
16{
17 ssize_t size = 0;
18 csmByte* buf = FileUtils::getInstance()->getDataFromFile(filePath).takeBuffer(&size);
19 *outSize = static_cast<csmSizeInt>(size);
20 return buf;
21}
22
23void LAppPal::ReleaseBytes(csmByte* byteData)
24{

Callers

nothing calls this directly

Calls 3

getInstanceFunction · 0.85
takeBufferMethod · 0.80
getDataFromFileMethod · 0.80

Tested by

no test coverage detected