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

Function ReadString

Source/ThirdParty/tinyexr.h:1189–1205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1187#endif
1188
1189static const char *ReadString(std::string *s, const char *ptr, size_t len) {
1190 // Read untile NULL(\0).
1191 const char *p = ptr;
1192 const char *q = ptr;
1193 while ((size_t(q - ptr) < len) && (*q) != 0) {
1194 q++;
1195 }
1196
1197 if (size_t(q - ptr) >= len) {
1198 (*s).clear();
1199 return NULL;
1200 }
1201
1202 (*s) = std::string(p, q);
1203
1204 return q + 1; // skip '\0'
1205}
1206
1207static bool ReadAttribute(std::string *name, std::string *type,
1208 std::vector<unsigned char> *data, size_t *marker_size,

Callers 1

ReadChannelInfoFunction · 0.85

Calls 1

clearMethod · 0.80

Tested by

no test coverage detected