mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 06:19:19 +02:00
refactor(sonar): remove empty statements, one declaration per statement (cpp:S1116, cpp:S1659)
This commit is contained in:
@@ -490,7 +490,7 @@ TController::cue_action( driver_hint const Action, float const Actionparameter )
|
||||
if( AIControllFlag ) {
|
||||
while( mvControlling->RList[mvControlling->MainCtrlPos].Mn == 0
|
||||
&& mvControlling->IncMainCtrl(1) ) {
|
||||
;
|
||||
// all work is done in the loop header
|
||||
}
|
||||
}
|
||||
remove_master_controller_hints();
|
||||
@@ -509,7 +509,7 @@ TController::cue_action( driver_hint const Action, float const Actionparameter )
|
||||
}
|
||||
while( mvControlling->RList[mvControlling->MainCtrlPos].Bn > 1
|
||||
&& mvControlling->DecMainCtrl(1) ) {
|
||||
; // all work is performed in the header
|
||||
// all work is performed in the header
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -535,7 +535,7 @@ TController::cue_action( driver_hint const Action, float const Actionparameter )
|
||||
if( AIControllFlag ) {
|
||||
while( false == mvControlling->EIMDirectionChangeAllow()
|
||||
&& mvControlling->DecMainCtrl(1) ) {
|
||||
;
|
||||
// all work is done in the loop header
|
||||
}
|
||||
}
|
||||
remove_master_controller_hints();
|
||||
@@ -778,7 +778,6 @@ TController::cue_action( driver_hint const Action, float const Actionparameter )
|
||||
while( BrakeCtrlPosition >= mvOccupied->HandleUnlock
|
||||
&& BrakeLevelAdd(-1) ) {
|
||||
// all work is done in the header
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -857,7 +856,9 @@ TController::cue_action( driver_hint const Action, float const Actionparameter )
|
||||
}
|
||||
case driver_hint::brakingforcesetzero: { // releases both train and independent brake
|
||||
if( AIControllFlag ) {
|
||||
while( true == DecBrake() ) { ; }
|
||||
while( true == DecBrake() ) {
|
||||
// all work is done in the loop condition
|
||||
}
|
||||
}
|
||||
remove_train_brake_hints();
|
||||
hint(
|
||||
|
||||
@@ -1565,7 +1565,7 @@ debug_panel::render_section_settings() {
|
||||
ImGui::SliderInt( ( std::to_string( Global.gfx_shadow_rank_cutoff ) + "###shadowrankcutoff" ).c_str(), &Global.gfx_shadow_rank_cutoff, 1, 3, "Shadow ranks" );
|
||||
if( ImGui::SliderFloat( ( to_string( std::abs( Global.gfx_shadow_angle_min ), 2 ) + "###shadowanglecutoff" ).c_str(), &Global.gfx_shadow_angle_min, -1.0, -0.2, "Shadow angle cutoff" ) ) {
|
||||
Global.gfx_shadow_angle_min = quantize( Global.gfx_shadow_angle_min, 0.05f );
|
||||
};
|
||||
}
|
||||
if( DebugModeFlag ) {
|
||||
// sky sliders
|
||||
{
|
||||
|
||||
@@ -106,17 +106,16 @@ private:
|
||||
std::array<char, 1024> m_buffer;
|
||||
std::array<char, 128> m_eventsearch;
|
||||
input_data m_input;
|
||||
std::vector<text_line>
|
||||
m_vehiclelines,
|
||||
m_enginelines,
|
||||
m_ailines,
|
||||
m_scantablelines,
|
||||
m_cameralines,
|
||||
m_scenariolines,
|
||||
m_eventqueuelines,
|
||||
m_powergridlines,
|
||||
m_rendererlines,
|
||||
m_uartlines;
|
||||
std::vector<text_line> m_vehiclelines;
|
||||
std::vector<text_line> m_enginelines;
|
||||
std::vector<text_line> m_ailines;
|
||||
std::vector<text_line> m_scantablelines;
|
||||
std::vector<text_line> m_cameralines;
|
||||
std::vector<text_line> m_scenariolines;
|
||||
std::vector<text_line> m_eventqueuelines;
|
||||
std::vector<text_line> m_powergridlines;
|
||||
std::vector<text_line> m_rendererlines;
|
||||
std::vector<text_line> m_uartlines;
|
||||
|
||||
double last_time = std::numeric_limits<double>::quiet_NaN();
|
||||
|
||||
|
||||
@@ -42,7 +42,8 @@ TTranscripts::Add( std::string const &txt, bool backgorund ) {
|
||||
cParser parser( asciitext );
|
||||
while( true == parser.getTokens( 3, false, "[]\n" ) ) {
|
||||
|
||||
float begin{ 0.f }, end{ 0.f };
|
||||
float begin{ 0.f };
|
||||
float end{ 0.f };
|
||||
std::string transcript;
|
||||
parser
|
||||
>> begin
|
||||
|
||||
Reference in New Issue
Block a user