MCPcopy Create free account
hub / github.com/ARM-software/astc-encoder / WriteAttributeToMemory

Function WriteAttributeToMemory

Source/ThirdParty/tinyexr.h:1269–1280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1267}
1268
1269static void WriteAttributeToMemory(std::vector<unsigned char> *out,
1270 const char *name, const char *type,
1271 const unsigned char *data, int len) {
1272 out->insert(out->end(), name, name + strlen(name) + 1);
1273 out->insert(out->end(), type, type + strlen(type) + 1);
1274
1275 int outLen = len;
1276 tinyexr::swap4(&outLen);
1277 out->insert(out->end(), reinterpret_cast<unsigned char *>(&outLen),
1278 reinterpret_cast<unsigned char *>(&outLen) + sizeof(int));
1279 out->insert(out->end(), data, data + len);
1280}
1281
1282typedef struct TChannelInfo {
1283 std::string name; // less than 255 bytes long

Callers 1

Calls 1

swap4Function · 0.85

Tested by

no test coverage detected