banned raw void pointer from public API
This commit is contained in:
parent
2b312f3494
commit
a5830ad9cd
5 changed files with 25 additions and 19 deletions
|
@ -18,13 +18,13 @@ struct image_io::impl
|
|||
image read_impl(const std::string& uri,uint32_t flags)
|
||||
{
|
||||
int x{ 0 }, y{ 0 }, n{ 0 };
|
||||
auto data = stbi_load(uri.c_str(), &x, &y, &n, 4);
|
||||
const auto data = stbi_load(uri.c_str(), &x, &y, &n, 4);
|
||||
|
||||
if (data) {
|
||||
|
||||
image r;
|
||||
|
||||
r.create(size(x,y),image::pixel_layout::RGBA8,data);
|
||||
r.create(size(x,y),image::pixel_layout::RGBA8,reinterpret_cast<image::data_t*>(data));
|
||||
|
||||
stbi_image_free(data);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue