mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 16:49:21 +02:00
refactor(sonar): document intentionally empty functions (cpp:S1186)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -296,6 +296,7 @@ double TNESt3::GetPF( double const PP, double const dt, double const Vel ) // pr
|
||||
|
||||
void TNESt3::EStParams( double const /*i_crc*/ ) const // parametry charakterystyczne dla ESt
|
||||
{
|
||||
// no effect for this device type
|
||||
}
|
||||
|
||||
void TNESt3::Init( double const PP, double const HPP, double const LPP, double const BP, int const BDF )
|
||||
|
||||
@@ -558,7 +558,7 @@ bool TBrake::Releaser() const
|
||||
/// support the EP brake (TWest, TEStEP1/2, ...).
|
||||
/// </summary>
|
||||
/// <param name="nEPS">EP intensity.</param>
|
||||
void TBrake::SetEPS(double const nEPS) {}
|
||||
void TBrake::SetEPS(double const nEPS) { /* no effect for this device type */ }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the anti-slip brake state flags. Bit 1 of <paramref name="state"/>
|
||||
@@ -1083,7 +1083,7 @@ void TESt::Init(double const PP, double const HPP, double const LPP, double cons
|
||||
/// derived variants and currently a no-op.
|
||||
/// </summary>
|
||||
/// <param name="i_crc">Characteristic value.</param>
|
||||
void TESt::EStParams(double const /*i_crc*/) const {}
|
||||
void TESt::EStParams(double const /*i_crc*/) const { /* no effect for this device type */ }
|
||||
|
||||
/// <summary>Returns the control reservoir (ZS) pressure.</summary>
|
||||
double TESt::GetCRP()
|
||||
@@ -2868,7 +2868,7 @@ void TDriverHandle::Init(double Press)
|
||||
|
||||
/// <summary>Default reductor adjustment — no-op.</summary>
|
||||
/// <param name="nAdj">Pressure correction.</param>
|
||||
void TDriverHandle::SetReductor(double nAdj) {}
|
||||
void TDriverHandle::SetReductor(double nAdj) { /* no effect for this device type */ }
|
||||
|
||||
/// <summary>Default cab-gauge pressure — 0.</summary>
|
||||
double TDriverHandle::GetCP()
|
||||
|
||||
@@ -442,7 +442,7 @@ class TBrake
|
||||
virtual void SetEPS(double const nEPS); // hamulec EP
|
||||
/// <summary>Sets the rapid step ratio. Default no-op; overridden where supported.</summary>
|
||||
/// <param name="RMR">Rapid ratio.</param>
|
||||
virtual void SetRM(double const RMR) {}; // ustalenie przelozenia rapida
|
||||
virtual void SetRM(double const RMR) { /* no effect for this device type */ } // ustalenie przelozenia rapida
|
||||
/// <summary>Sets the velocity threshold for the rapid step.</summary>
|
||||
/// <param name="RVR">Velocity threshold (same unit as Vel passed to GetPF).</param>
|
||||
virtual void SetRV(double const RVR)
|
||||
@@ -456,13 +456,13 @@ class TBrake
|
||||
/// <param name="TM">Tare (empty) mass.</param>
|
||||
/// <param name="LM">Loaded mass.</param>
|
||||
/// <param name="TBP">Brake cylinder pressure for the tare mass.</param>
|
||||
virtual void SetLP(double const TM, double const LM, double const TBP) {}; // parametry przystawki wazacej
|
||||
virtual void SetLP(double const TM, double const LM, double const TBP) { /* no effect for this device type */ } // parametry przystawki wazacej
|
||||
/// <summary>Sets the auxiliary (local) brake target pressure.</summary>
|
||||
/// <param name="P">Local brake pressure [bar].</param>
|
||||
virtual void SetLBP(double const P) {}; // cisnienie z hamulca pomocniczego
|
||||
virtual void SetLBP(double const P) { /* no effect for this device type */ } // cisnienie z hamulca pomocniczego
|
||||
/// <summary>Updates the load-weighing pressure coefficient based on current vehicle mass.</summary>
|
||||
/// <param name="mass">Current vehicle mass.</param>
|
||||
virtual void PLC(double const mass) {}; // wspolczynnik cisnienia przystawki wazacej
|
||||
virtual void PLC(double const mass) { /* no effect for this device type */ } // wspolczynnik cisnienia przystawki wazacej
|
||||
/// <summary>
|
||||
/// Engages the anti-slip brake function (set hold and/or release flags).
|
||||
/// </summary>
|
||||
@@ -498,7 +498,7 @@ class TBrake
|
||||
/// brake when ED braking is sufficient. Default no-op; overridden where supported.
|
||||
/// </summary>
|
||||
/// <param name="EDstate">ED brake intensity (0..1).</param>
|
||||
virtual void SetED(double const EDstate) {}; // stan hamulca ED do luzowania
|
||||
virtual void SetED(double const EDstate) { /* no effect for this device type */ } // stan hamulca ED do luzowania
|
||||
/// <summary>Sets the universal-button flags (see TUniversalBrake).</summary>
|
||||
/// <param name="flag">Combined ub_* flags.</param>
|
||||
virtual void SetUniversalFlag(int flag)
|
||||
@@ -1076,7 +1076,7 @@ class TDriverHandle
|
||||
/// <param name="OverP">Unbrake over-pressure [bar].</param>
|
||||
/// <param name="OMP">Overload (assimilation) max pressure [bar].</param>
|
||||
/// <param name="OPD">Overload pressure decay rate [bar/s].</param>
|
||||
virtual void SetParams(bool AO, bool MO, double, double, double OMP, double OPD) {}; // ustawianie jakichs parametrow dla zaworu
|
||||
virtual void SetParams(bool AO, bool MO, double, double, double OMP, double OPD) { /* no effect for this device type */ } // ustawianie jakichs parametrow dla zaworu
|
||||
/// <summary>Sets the manual overcharge button state.</summary>
|
||||
/// <param name="Active">True while the button is pressed.</param>
|
||||
virtual void OvrldButton(bool Active); // przycisk recznego przeladowania/asymilacji
|
||||
|
||||
@@ -21,7 +21,7 @@ struct IMaterial
|
||||
{
|
||||
static struct NullMaterial : public IMaterial
|
||||
{
|
||||
void finalize(bool Loadnow) override {}
|
||||
void finalize(bool Loadnow) override { /* null implementation, nothing to do */ }
|
||||
bool update() override
|
||||
{
|
||||
return false;
|
||||
|
||||
@@ -45,8 +45,8 @@ struct ITexture
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
void release() override {}
|
||||
void make_stub() override {}
|
||||
void release() override { /* null implementation, nothing to do */ }
|
||||
void make_stub() override { /* null implementation, nothing to do */ }
|
||||
std::string_view get_traits() const override
|
||||
{
|
||||
return "";
|
||||
@@ -67,9 +67,9 @@ struct ITexture
|
||||
{
|
||||
return false;
|
||||
}
|
||||
void set_components_hint(int hint) override {}
|
||||
void make_from_memory(size_t width, size_t height, const uint8_t *data) override {}
|
||||
void update_from_memory(size_t width, size_t height, const uint8_t *data) override {}
|
||||
void set_components_hint(int hint) override { /* null implementation, nothing to do */ }
|
||||
void make_from_memory(size_t width, size_t height, const uint8_t *data) override { /* null implementation, nothing to do */ }
|
||||
void update_from_memory(size_t width, size_t height, const uint8_t *data) override { /* null implementation, nothing to do */ }
|
||||
} null_texture{};
|
||||
return &null_texture;
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ void launcher_mode::enter()
|
||||
|
||||
void launcher_mode::exit()
|
||||
{
|
||||
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
void launcher_mode::on_key(const int Key, const int Scancode, const int Action, const int Mods)
|
||||
|
||||
@@ -19,8 +19,8 @@ struct message
|
||||
type_e type;
|
||||
|
||||
message(type_e t) : type(t) {}
|
||||
virtual void serialize(std::ostream &stream) const {}
|
||||
virtual void deserialize(std::istream &stream) {}
|
||||
virtual void serialize(std::ostream &stream) const { /* message carries no payload */ }
|
||||
virtual void deserialize(std::istream &stream) { /* message carries no payload */ }
|
||||
virtual ~message() = default;
|
||||
};
|
||||
|
||||
|
||||
@@ -23,16 +23,16 @@ private:
|
||||
// methods:
|
||||
// create() subclass details
|
||||
void
|
||||
create_( gfx::geometry_handle const &Geometry ) override {}
|
||||
create_( gfx::geometry_handle const &Geometry ) override { /* null implementation, nothing to do */ }
|
||||
// replace() subclass details
|
||||
void
|
||||
replace_( gfx::geometry_handle const &Geometry ) override {}
|
||||
replace_( gfx::geometry_handle const &Geometry ) override { /* null implementation, nothing to do */ }
|
||||
// draw() subclass details
|
||||
auto
|
||||
draw_( gfx::geometry_handle const &Geometry, gfx::stream_units const &Units, unsigned int const Streams ) -> std::size_t override { return 0; }
|
||||
// release() subclass details
|
||||
void
|
||||
release_() override {}
|
||||
release_() override { /* null implementation, nothing to do */ }
|
||||
};
|
||||
|
||||
// bare-bones render controller, in lack of anything better yet
|
||||
@@ -51,14 +51,14 @@ public:
|
||||
bool
|
||||
Render() override { return true; }
|
||||
void
|
||||
SwapBuffers() override {}
|
||||
SwapBuffers() override { /* null implementation, nothing to do */ }
|
||||
inline
|
||||
float
|
||||
Framerate() override { return 10.0f; }
|
||||
|
||||
bool AddViewport(const global_settings::extraviewport_config &conf) override { return false; }
|
||||
bool Debug_Ui_State(std::optional<bool>) override { return false; }
|
||||
void Shutdown() override {}
|
||||
void Shutdown() override { /* null implementation, nothing to do */ }
|
||||
|
||||
// geometry methods
|
||||
// NOTE: hands-on geometry management is exposed as a temporary measure; ultimately all visualization data should be generated/handled automatically by the renderer itself
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
return static_cast<material_handle>(m_materials.size());
|
||||
}
|
||||
void
|
||||
Bind_Material( material_handle const Material, TSubModel const *sm = nullptr, lighting_data const *lighting = nullptr ) override {}
|
||||
Bind_Material( material_handle const Material, TSubModel const *sm = nullptr, lighting_data const *lighting = nullptr ) override { /* null implementation, nothing to do */ }
|
||||
IMaterial const *
|
||||
Material( material_handle const Material ) const override { return m_materials.at(Material - 1).get(); }
|
||||
// shader methods
|
||||
@@ -112,18 +112,18 @@ public:
|
||||
texture_handle
|
||||
Fetch_Texture( std::string const &Filename, bool const Loadnow = true, GLint format_hint = GL_SRGB_ALPHA ) override { throw std::runtime_error("not impl"); }
|
||||
void
|
||||
Bind_Texture( texture_handle const Texture ) override {}
|
||||
Bind_Texture( texture_handle const Texture ) override { /* null implementation, nothing to do */ }
|
||||
void
|
||||
Bind_Texture( std::size_t const Unit, texture_handle const Texture ) override {}
|
||||
Bind_Texture( std::size_t const Unit, texture_handle const Texture ) override { /* null implementation, nothing to do */ }
|
||||
opengl_texture &
|
||||
Texture( texture_handle const Texture ) override { throw std::runtime_error("not impl"); }
|
||||
opengl_texture const &
|
||||
Texture( texture_handle const Texture ) const override { throw std::runtime_error("not impl"); }
|
||||
// utility methods
|
||||
void
|
||||
Pick_Control_Callback( std::function<void( TSubModel const *, const glm::vec2 )> Callback ) override {}
|
||||
Pick_Control_Callback( std::function<void( TSubModel const *, const glm::vec2 )> Callback ) override { /* null implementation, nothing to do */ }
|
||||
void
|
||||
Pick_Node_Callback( std::function<void( scene::basic_node * )> Callback ) override {}
|
||||
Pick_Node_Callback( std::function<void( scene::basic_node * )> Callback ) override { /* null implementation, nothing to do */ }
|
||||
TSubModel const *
|
||||
Pick_Control() const override { return nullptr; }
|
||||
scene::basic_node const *
|
||||
@@ -132,11 +132,11 @@ public:
|
||||
Mouse_Position() const override { return glm::dvec3(); }
|
||||
// maintenance methods
|
||||
void
|
||||
Update( double const Deltatime ) override {}
|
||||
Update( double const Deltatime ) override { /* null implementation, nothing to do */ }
|
||||
void
|
||||
Update_Pick_Control() override {}
|
||||
Update_Pick_Control() override { /* null implementation, nothing to do */ }
|
||||
void
|
||||
Update_Pick_Node() override {}
|
||||
Update_Pick_Node() override { /* null implementation, nothing to do */ }
|
||||
glm::dvec3
|
||||
Update_Mouse_Position() override { return glm::dvec3(); }
|
||||
// debug methods
|
||||
@@ -144,7 +144,7 @@ public:
|
||||
info_times() const override { return empty_str; }
|
||||
std::string const &
|
||||
info_stats() const override { return empty_str; }
|
||||
void MakeScreenshot() override {}
|
||||
void MakeScreenshot() override { /* null implementation, nothing to do */ }
|
||||
|
||||
static std::unique_ptr<gfx_renderer> create_func();
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ void opengl33_light::apply_intensity(float const Factor) {
|
||||
factor = Factor;
|
||||
}
|
||||
|
||||
void opengl33_light::apply_angle() const {}
|
||||
void opengl33_light::apply_angle() const { /* nothing to do */ }
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
@@ -232,7 +232,7 @@ void render_task::upload() const
|
||||
}
|
||||
}
|
||||
|
||||
void render_task::cancel() const {}
|
||||
void render_task::cancel() const { /* nothing to do */ }
|
||||
|
||||
// initializes the module. returns true on success
|
||||
auto python_taskqueue::init() -> bool
|
||||
|
||||
Reference in New Issue
Block a user