mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
patched code after code review from MihailRis
This commit is contained in:
parent
67da57d870
commit
f8a44c023f
2 changed files with 23 additions and 21 deletions
|
|
@ -164,8 +164,11 @@ static int l_clear(State* L) {
|
|||
size_t pixelscount = image.getWidth() * image.getHeight();
|
||||
uint32_t* data = reinterpret_cast<uint32_t*>(image.getData());
|
||||
|
||||
if (gettop(L) == 1) std::fill(data, data + pixelscount, 0);
|
||||
else std::fill(data, data + pixelscount, get_rgba(L, 2).rgba);
|
||||
if (gettop(L) == 1) {
|
||||
std::fill(data, data + pixelscount, 0);
|
||||
} else {
|
||||
std::fill(data, data + pixelscount, get_rgba(L, 2).rgba);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue