MCPcopy Create free account
hub / github.com/darktable-org/rawspeed / getString

Method getString

src/librawspeed/io/ByteStream.h:177–187  ·  view source on GitHub ↗

Increments the stream to after the next zero byte and returns the bytes in between (not a copy). If the first byte is zero, stream is incremented one.

Source from the content-addressed store, hash-verified

175 // Increments the stream to after the next zero byte and returns the bytes in between (not a copy).
176 // If the first byte is zero, stream is incremented one.
177 const char* getString() {
178 assert(data);
179 size_type start = pos;
180 bool isNullTerminator = false;
181 do {
182 check(1);
183 isNullTerminator = (data[pos] == '\0');
184 pos++;
185 } while (!isNullTerminator);
186 return reinterpret_cast<const char*>(&data[start]);
187 }
188
189 // special factory function to set up internal buffer with copy of passed data.
190 // only necessary to create 'fake' TiffEntries (see e.g. RAF)

Callers

nothing calls this directly

Calls 1

checkFunction · 0.85

Tested by

no test coverage detected