mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 20:11:50 +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
|
|
@ -21,7 +21,7 @@ enum class BlockInteraction { step, destruction, placing };
|
|||
|
||||
/// @brief Player argument is nullable
|
||||
using on_block_interaction = std::function<
|
||||
void(Player*, glm::ivec3, const Block*, BlockInteraction type)>;
|
||||
void(Player*, glm::ivec3, const Block&, BlockInteraction type)>;
|
||||
|
||||
/// BlocksController manages block updates and data (inventories, metadata)
|
||||
class BlocksController {
|
||||
|
|
@ -40,9 +40,9 @@ public:
|
|||
void updateSides(int x, int y, int z);
|
||||
void updateBlock(int x, int y, int z);
|
||||
|
||||
void breakBlock(Player* player, const Block* def, int x, int y, int z);
|
||||
void breakBlock(Player* player, const Block& def, int x, int y, int z);
|
||||
void placeBlock(
|
||||
Player* player, const Block* def, blockstate state, int x, int y, int z
|
||||
Player* player, const Block& def, blockstate state, int x, int y, int z
|
||||
);
|
||||
|
||||
void update(float delta);
|
||||
|
|
@ -56,7 +56,7 @@ public:
|
|||
void unbindInventory(int x, int y, int z);
|
||||
|
||||
void onBlockInteraction(
|
||||
Player* player, glm::ivec3 pos, const Block* def, BlockInteraction type
|
||||
Player* player, glm::ivec3 pos, const Block& def, BlockInteraction type
|
||||
);
|
||||
|
||||
/// @brief Add block interaction callback
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue