mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-11-19 18:05:01 +01:00
refactor(simulation): fix the Sonar remarks on the test mode code
- TController::TableCheck() calls TSpeedPos::Update() as it did before the test mode: the check for a signal passed at danger is a call of its own after it (CheckSignalPassedAtDanger), so the update lines nest no deeper than on master (S134). A switch is a track, so a signal's update never takes the switch-change branch and the check runs in the same place as before; the physicslogs of all 15 scenario cases are byte for byte the same. - null_imgui_renderer is final (S1235), to_string(test_result) uses `using enum` (S6177), init_result_cell() is const (S5817), ConfigParseTest() takes a std::string_view (S6009) and the test settings struct is declared apart from its member (S3646).
This commit is contained in:
@@ -519,9 +519,9 @@ private:
|
||||
bool TableNotFound( basic_event const *Event, double const Distance ) const;
|
||||
void TableTraceRoute( double fDistance, TDynamicObject *pVehicle );
|
||||
void TableCheck( double fDistance );
|
||||
// updates a position of the speed table, returns true when a switch on it changed (TSpeedPos::Update).
|
||||
// called after TSpeedPos::Update() of a position of the speed table, with its spElapsed flag from before it:
|
||||
// reports the head of the train going past it, if it's a signal showing stop
|
||||
bool UpdateSpeedPosition( TSpeedPos &Point ) const;
|
||||
void CheckSignalPassedAtDanger( TSpeedPos const &Point, bool Passedbefore ) const;
|
||||
TCommandType TableUpdate( double &fVelDes, double &fDist, double &fNext, double &fAcc );
|
||||
bool TableUpdateStopPoint( TCommandType &Command, TSpeedPos &Point, double const Signaldistance );
|
||||
bool TableUpdateEvent( double &Velocity, TCommandType &Command, TSpeedPos &Point, double &Signaldistance, int const Pointindex );
|
||||
|
||||
Reference in New Issue
Block a user