mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Fix compiler warnings
This commit is contained in:
parent
6952bab519
commit
492aab20fe
6 changed files with 23 additions and 23 deletions
|
@ -71,14 +71,14 @@ static void imageCleanTransparentWithInlining(video::IImage *src, u32 threshold)
|
|||
void *const src_data = src->getData();
|
||||
const core::dimension2d<u32> dim = src->getDimension();
|
||||
|
||||
auto get_pixel = [src, src_data, dim](u32 x, u32 y) -> video::SColor {
|
||||
auto get_pixel = [=](u32 x, u32 y) -> video::SColor {
|
||||
if constexpr (IS_A8R8G8B8) {
|
||||
return reinterpret_cast<u32 *>(src_data)[y*dim.Width + x];
|
||||
} else {
|
||||
return src->getPixel(x, y);
|
||||
}
|
||||
};
|
||||
auto set_pixel = [src, src_data, dim](u32 x, u32 y, video::SColor color) {
|
||||
auto set_pixel = [=](u32 x, u32 y, video::SColor color) {
|
||||
if constexpr (IS_A8R8G8B8) {
|
||||
u32 *dest = &reinterpret_cast<u32 *>(src_data)[y*dim.Width + x];
|
||||
*dest = color.color;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue