MCPcopy Create free account
hub / github.com/android/ndk-samples / LoadBinaryFileToVector

Function LoadBinaryFileToVector

hello-vulkan/app/src/main/cpp/hellovk.h:78–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76};
77
78std::vector<uint8_t> LoadBinaryFileToVector(const char* file_path,
79 AAssetManager* assetManager) {
80 std::vector<uint8_t> file_content;
81 assert(assetManager);
82 AAsset* file =
83 AAssetManager_open(assetManager, file_path, AASSET_MODE_BUFFER);
84 size_t file_length = AAsset_getLength(file);
85
86 file_content.resize(file_length);
87
88 AAsset_read(file, file_content.data(), file_length);
89 AAsset_close(file);
90 return file_content;
91}
92
93const char* toStringMessageSeverity(VkDebugUtilsMessageSeverityFlagBitsEXT s) {
94 switch (s) {

Callers 1

Calls 2

dataMethod · 0.80
resizeMethod · 0.45

Tested by

no test coverage detected