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

reformat: remove redundant 'inline' specifier

This commit is contained in:
jerrrrycho
2026-07-04 05:58:21 +02:00
parent b4b6686320
commit 6e4d000ddb
85 changed files with 877 additions and 988 deletions

View File

@@ -59,29 +59,29 @@ public:
bool
pop_mode();
bool
push_mode( mode const Mode );
push_mode( mode Mode );
void
set_title( std::string const &Title );
void
set_progress( float const Progress = 0.f, float const Subtaskprogress = 0.f );
set_progress( float Progress = 0.f, float Subtaskprogress = 0.f );
void
set_tooltip( std::string const &Tooltip );
void
set_cursor( int const Mode );
set_cursor( int Mode );
void
set_cursor_pos( double const Horizontal, double const Vertical );
set_cursor_pos( double Horizontal, double Vertical );
void queue_screenshot();
// input handlers
void on_key( int const Key, int const Scancode, int const Action, int const Mods );
void on_char( unsigned int const Char );
void on_cursor_pos( double const Horizontal, double const Vertical );
void on_mouse_button( int const Button, int const Action, int const Mods );
void on_scroll( double const Xoffset, double const Yoffset );
void on_key( int Key, int Scancode, int Action, int Mods );
void on_char( unsigned int Char );
void on_cursor_pos( double Horizontal, double Vertical );
void on_mouse_button( int Button, int Action, int Mods );
void on_scroll( double Xoffset, double Yoffset );
void on_focus_change(bool focus);
void on_window_resize(int w, int h);
// gives access to specified window, creates a new window if index == -1
GLFWwindow *
window( int const Windowindex = 0, bool visible = false, int width = 1, int height = 1, GLFWmonitor *monitor = nullptr, bool keep_ownership = true, bool share_ctx = true );
window( int Windowindex = 0, bool visible = false, int width = 1, int height = 1, GLFWmonitor *monitor = nullptr, bool keep_ownership = true, bool share_ctx = true );
GLFWmonitor * find_monitor( const std::string &str ) const;
std::string describe_monitor( GLFWmonitor *monitor ) const;
// generate network sync verification number

View File

@@ -24,20 +24,16 @@ public:
// mode-specific update of simulation data. returns: false on error, true otherwise
virtual bool update() = 0;
// draws mode-specific user interface
inline
void render_ui() {
void render_ui() {
if( m_userinterface != nullptr ) {
m_userinterface->render(); } }
inline
void begin_ui_frame() {
if( m_userinterface != nullptr ) {
m_userinterface->begin_ui_frame(); } }
inline
void set_progress( float const Progress = 0.f, float const Subtaskprogress = 0.f ) {
void set_progress( float const Progress = 0.f, float const Subtaskprogress = 0.f ) {
if( m_userinterface != nullptr ) {
m_userinterface->set_progress( Progress, Subtaskprogress ); } }
inline
void set_tooltip( std::string const &Tooltip ) {
void set_tooltip( std::string const &Tooltip ) {
if( m_userinterface != nullptr ) {
m_userinterface->set_tooltip( Tooltip ); } }
// maintenance method, called when the mode is activated

View File

@@ -86,18 +86,18 @@ private:
std::string
binding_hints( std::pair<user_command, user_command> const &Commands ) const;
std::pair<user_command, user_command>
command_fallback( user_command const Command ) const;
command_fallback( user_command Command ) const;
};
// methods
void update_camera( const double Deltatime );
void update_camera(double Deltatime );
// handles vehicle change flag
void OnKeyDown( int cKey );
void InOutKey();
void CabView();
void ExternalView();
void DistantView( bool const Near = false );
void set_picking( bool const Picking );
void DistantView( bool Near = false );
void set_picking( bool Picking );
// members
drivermode_input m_input;

View File

@@ -30,13 +30,13 @@ public:
void showDebugUI() override;
// potentially processes provided input key. returns: true if the input was processed, false otherwise
bool
on_key( int const Key, int const Action ) override;
on_key( int Key, int Action ) override;
// potentially processes provided mouse movement. returns: true if the input was processed, false otherwise
bool
on_cursor_pos( double const Horizontal, double const Vertical ) override;
on_cursor_pos( double Horizontal, double Vertical ) override;
// potentially processes provided mouse button. returns: true if the input was processed, false otherwise
bool
on_mouse_button( int const Button, int const Action ) override;
on_mouse_button( int Button, int Action ) override;
// updates state of UI elements
void
update() override;
@@ -49,7 +49,7 @@ private:
// methods
// sets visibility of the cursor
void
set_cursor( bool const Visible );
set_cursor( bool Visible );
// render() subclass details
void
render_() override;

View File

@@ -93,7 +93,7 @@ private:
void update_section_uart( std::vector<text_line> &Output );
#endif
// section update helpers
std::string update_vehicle_coupler( int const Side );
std::string update_vehicle_coupler( int Side );
std::string update_vehicle_brake() const;
// renders provided lines, under specified collapsing header
bool render_section( std::string const &Header, std::vector<text_line> const &Lines );

View File

@@ -48,19 +48,19 @@ namespace
using vec3 = glm::vec3;
using dvec2 = glm::dvec2;
inline bool is_release(int state)
bool is_release(int state)
{
return state == GLFW_RELEASE;
}
inline bool is_press(int state)
bool is_press(int state)
{
return state == GLFW_PRESS;
}
// tests whether the vertical line through (Px,Pz) passes over triangle abc; if so returns the
// surface height at that point through OutY. used by the "snap to ground" (END) feature.
inline bool triangle_height_at(glm::dvec3 const &a, glm::dvec3 const &b, glm::dvec3 const &c,
bool triangle_height_at(glm::dvec3 const &a, glm::dvec3 const &b, glm::dvec3 const &c,
double const Px, double const Pz, double &OutY)
{
double const ux = b.x - a.x, uz = b.z - a.z;

View File

@@ -97,7 +97,7 @@ class editor_mode : public application_mode
std::vector<EditorSnapshot> m_history; // history of changes to nodes, used for undo functionality
std::vector<EditorSnapshot> g_redo;
// methods
void update_camera(double const Deltatime);
void update_camera(double Deltatime);
editor_ui *ui() const;
void redo_last();

View File

@@ -61,7 +61,7 @@ class brush_object_list : public ui_panel
std::string Template;
public:
brush_object_list(std::string const &Name, bool const Isopen);
brush_object_list(std::string const &Name, bool Isopen);
void render() override;
void update(std::string nodeTemplate);
@@ -85,7 +85,7 @@ class nodebank_panel : public ui_panel
};
edit_mode mode = MODIFY;
nodebank_panel(std::string const &Name, bool const Isopen);
nodebank_panel(std::string const &Name, bool Isopen);
void nodebank_reload();
void render() override;
void add_template(const std::string &desc);