refactor: PVS-Studio warnings fixes

This commit is contained in:
MihailRis
2024-08-04 01:12:42 +03:00
parent 7bc96affbb
commit 245b39be62
22 changed files with 311 additions and 302 deletions
+2 -2
View File
@@ -25,8 +25,8 @@ LevelFrontend::LevelFrontend(
"block-previews"
);
controller->getBlocksController()->listenBlockInteraction(
[=](Player* player, glm::ivec3 pos, const Block* def, BlockInteraction type) {
auto material = level->content->findBlockMaterial(def->material);
[=](Player* player, glm::ivec3 pos, const Block& def, BlockInteraction type) {
auto material = level->content->findBlockMaterial(def.material);
if (material == nullptr) {
return;
}