mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 05:09:20 +02:00
refactor(sonar): take read-only pointer and reference parameters as const (cpp:S995)
TTrain command handlers keep their signature, it is fixed by the handler table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -315,7 +315,7 @@ drivermouse_input::button( int const Button, int const Action ) {
|
||||
// left mouse button launches on_click event associated with to the node
|
||||
if (Button == GLFW_MOUSE_BUTTON_LEFT && Action == GLFW_PRESS) {
|
||||
GfxRenderer->Pick_Node_Callback(
|
||||
[](scene::basic_node *node) {
|
||||
[](scene::basic_node const *node) {
|
||||
if( node == nullptr
|
||||
|| typeid(*node) != typeid(TAnimModel) )
|
||||
return;
|
||||
|
||||
@@ -124,7 +124,7 @@ gamepad_input::poll() {
|
||||
}
|
||||
|
||||
void
|
||||
gamepad_input::bind( std::vector< std::reference_wrapper<user_command> > &Targets, cParser &Input, std::unordered_map<std::string, user_command> const &Translator, std::string const Point ) const {
|
||||
gamepad_input::bind( std::vector< std::reference_wrapper<user_command> > const &Targets, cParser &Input, std::unordered_map<std::string, user_command> const &Translator, std::string const Point ) const {
|
||||
|
||||
for( auto const &bindingtarget : Targets ) {
|
||||
// grab command(s) associated with the input pin
|
||||
|
||||
@@ -77,7 +77,7 @@ private:
|
||||
using inputaxis_sequence = std::vector<input_axis>;
|
||||
// methods
|
||||
bool recall_bindings();
|
||||
void bind( std::vector< std::reference_wrapper<user_command> > &Targets, cParser &Input, std::unordered_map<std::string, user_command> const &Translator, std::string const Point ) const;
|
||||
void bind( std::vector< std::reference_wrapper<user_command> > const &Targets, cParser &Input, std::unordered_map<std::string, user_command> const &Translator, std::string const Point ) const;
|
||||
void on_button( int const Button, int const Action );
|
||||
void process_axes();
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ Navigate([[maybe_unused]] std::string const &ClassName, [[maybe_unused]] UINT Ms
|
||||
}
|
||||
|
||||
void
|
||||
OnCommandGet(multiplayer::DaneRozkaz *pRozkaz)
|
||||
OnCommandGet(multiplayer::DaneRozkaz const *pRozkaz)
|
||||
{ // odebranie komunikatu z serwera
|
||||
if (pRozkaz->iSygn == EU07_MESSAGEHEADER )
|
||||
switch (pRozkaz->iComm)
|
||||
|
||||
@@ -38,7 +38,7 @@ struct DaneRozkaz2 { // struktura komunikacji z EU07.EXE
|
||||
|
||||
void Navigate( std::string const &ClassName, UINT Msg, WPARAM wParam, LPARAM lParam );
|
||||
|
||||
void OnCommandGet( multiplayer::DaneRozkaz *pRozkaz );
|
||||
void OnCommandGet( multiplayer::DaneRozkaz const *pRozkaz );
|
||||
|
||||
void WyslijEvent( const std::string &e, const std::string &d );
|
||||
void WyslijString( const std::string &t, int n );
|
||||
|
||||
Reference in New Issue
Block a user