MCPcopy Create free account
hub / github.com/OpenPathGuidingLibrary/openpgl / WriteAttributeToMemory

Function WriteAttributeToMemory

third-party/tinyexr/tinyexr.h:1125–1136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1123}
1124
1125static void WriteAttributeToMemory(std::vector<unsigned char> *out,
1126 const char *name, const char *type,
1127 const unsigned char *data, int len) {
1128 out->insert(out->end(), name, name + strlen(name) + 1);
1129 out->insert(out->end(), type, type + strlen(type) + 1);
1130
1131 int outLen = len;
1132 tinyexr::swap4(&outLen);
1133 out->insert(out->end(), reinterpret_cast<unsigned char *>(&outLen),
1134 reinterpret_cast<unsigned char *>(&outLen) + sizeof(int));
1135 out->insert(out->end(), data, data + len);
1136}
1137
1138typedef struct TChannelInfo {
1139 std::string name; // less than 255 bytes long

Callers 1

Calls 2

swap4Function · 0.85
endMethod · 0.45

Tested by

no test coverage detected