| 33 | } |
| 34 | |
| 35 | void png_reader_callback(png_structp png, png_bytep data, png_size_t length) |
| 36 | { |
| 37 | using callback_t = std::function<std::size_t(char*,std::size_t)>; |
| 38 | callback_t* clb = static_cast<callback_t*>(png_get_io_ptr(png)); |
| 39 | const auto ret = (*clb)((char*)data, length); |
| 40 | if (ret != length) |
| 41 | png_error(png, "png_loader: read error in png_reader_callback"); |
| 42 | } |
| 43 | |
| 44 | // ---------------------------------------------------------------------------------------- |
| 45 |
nothing calls this directly
no test coverage detected