MCPcopy Create free account
hub / github.com/SFML/SFML / read

Function read

src/SFML/Graphics/Image.cpp:67–72  ·  view source on GitHub ↗

stb_image callbacks that operate on a sf::InputStream

Source from the content-addressed store, hash-verified

65{
66// stb_image callbacks that operate on a sf::InputStream
67int read(void* user, char* data, int size)
68{
69 auto& stream = *static_cast<sf::InputStream*>(user);
70 const std::optional count = stream.read(data, static_cast<std::size_t>(size));
71 return count ? static_cast<int>(*count) : -1;
72}
73
74void skip(void* user, int size)
75{

Callers

nothing calls this directly

Calls 1

readMethod · 0.45

Tested by

no test coverage detected