MCPcopy Create free account
hub / github.com/cinder/Cinder / WriteAttributeToMemory

Function WriteAttributeToMemory

include/tinyexr/tinyexr.h:1199–1210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1197}
1198
1199static void WriteAttributeToMemory(std::vector<unsigned char> *out,
1200 const char *name, const char *type,
1201 const unsigned char *data, int len) {
1202 out->insert(out->end(), name, name + strlen(name) + 1);
1203 out->insert(out->end(), type, type + strlen(type) + 1);
1204
1205 int outLen = len;
1206 tinyexr::swap4(&outLen);
1207 out->insert(out->end(), reinterpret_cast<unsigned char *>(&outLen),
1208 reinterpret_cast<unsigned char *>(&outLen) + sizeof(int));
1209 out->insert(out->end(), data, data + len);
1210}
1211
1212typedef struct TChannelInfo {
1213 std::string name; // less than 255 bytes long

Callers 1

Calls 3

swap4Function · 0.85
insertMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected