16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 09:59:18 +02:00

reformat: functions can be made static

This commit is contained in:
jerrrrycho
2026-07-04 06:09:04 +02:00
parent 1d0d1c015b
commit aeb800283c
66 changed files with 199 additions and 184 deletions

View File

@@ -877,7 +877,8 @@ void command_queue::push_commands(const commands_map &commands) {
void
command_relay::post(user_command const Command, double const Param1, double const Param2,
int const Action, uint16_t Recipient, glm::vec3 Position, const std::string *Payload) const {
int const Action, uint16_t Recipient, glm::vec3 Position, const std::string *Payload)
{
auto const &command = simulation::Commands_descriptions[ static_cast<std::size_t>( Command ) ];

View File

@@ -468,7 +468,7 @@ public:
void
update();
// checks if given command must be scheduled on server
bool
static bool
is_network_target(uint32_t Recipient);
// pops commands from intercept queue
@@ -527,9 +527,9 @@ class command_relay {
public:
// methods
// posts specified command for the specified recipient
void
static void
post(user_command Command, double Param1, double Param2,
int Action, uint16_t Recipient, glm::vec3 Position = glm::vec3(0.0f) , const std::string *Payload = nullptr) const;
int Action, uint16_t Recipient, glm::vec3 Position = glm::vec3(0.0f) , const std::string *Payload = nullptr);
private:
// types
// members

View File

@@ -89,7 +89,7 @@ private:
void
default_bindings();
// potentially replaces supplied command with a more relevant one
user_command
static user_command
adjust_command( user_command Command );
// members

View File

@@ -18,7 +18,7 @@ public:
editormouse_input() = default;
// methods
bool
static bool
init();
void
position( double Horizontal, double Vertical );

View File

@@ -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 Point );
static void bind( std::vector< std::reference_wrapper<user_command> > &Targets, cParser &Input, std::unordered_map<std::string, user_command> const &Translator, std::string Point );
void on_button( int Button, int Action );
void process_axes();

View File

@@ -323,7 +323,8 @@ keyboard_input::key( int const Key, int const Action ) {
}
int
keyboard_input::key( int const Key ) const {
keyboard_input::key( int const Key )
{
return input::keys[ Key ];
}

View File

@@ -51,8 +51,8 @@ public:
init() { return true; }
bool
key( int Key, int Action );
int
key( int Key ) const;
static int
key( int Key );
void
poll();
user_command const