mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
refactor: PVS-Studio warnings fixes
This commit is contained in:
parent
7bc96affbb
commit
245b39be62
22 changed files with 311 additions and 302 deletions
|
|
@ -149,9 +149,9 @@ void ChunksStorage::getVoxels(VoxelsVolume* volume, bool backlight) const {
|
|||
voxels[vidx] = cvoxels[cidx];
|
||||
light_t light = clights[cidx];
|
||||
if (backlight) {
|
||||
auto block =
|
||||
indices->blocks.get(voxels[vidx].id); //FIXME: Potentional null pointer
|
||||
if (block->lightPassing) { //-V522
|
||||
const auto& block =
|
||||
indices->blocks.require(voxels[vidx].id);
|
||||
if (block.lightPassing) { //-V522
|
||||
light = Lightmap::combine(
|
||||
min(15,
|
||||
Lightmap::extract(light, 0) + 1),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue