mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
Optimize parameter passing to avoid unnecessary copying
This commit is contained in:
parent
46ca1bb04a
commit
f25a425cb9
123 changed files with 578 additions and 522 deletions
|
|
@ -37,7 +37,7 @@ class CameraControl {
|
|||
/// @brief Switch active player camera
|
||||
void switchCamera();
|
||||
public:
|
||||
CameraControl(std::shared_ptr<Player> player, const CameraSettings& settings);
|
||||
CameraControl(const std::shared_ptr<Player>& player, const CameraSettings& settings);
|
||||
void updateMouse(PlayerInput& input);
|
||||
void update(const PlayerInput& input, float delta, Chunks* chunks);
|
||||
void refresh();
|
||||
|
|
@ -91,7 +91,7 @@ public:
|
|||
|
||||
Player* getPlayer();
|
||||
|
||||
void listenBlockInteraction(on_block_interaction callback);
|
||||
void listenBlockInteraction(const on_block_interaction& callback);
|
||||
};
|
||||
|
||||
#endif /* PLAYER_CONTROL_HPP_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue