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

Do not allow implicit cast for inline std::string to_string(bool Value) and change to_string to std::string for non boolean values

This commit is contained in:
docentYT
2026-05-03 15:49:29 +02:00
parent 1e8b3d554a
commit 13c7317f6e
11 changed files with 60 additions and 59 deletions

View File

@@ -150,7 +150,7 @@ bool TEventLauncher::Load(cParser *parser)
WriteLog(
"EventLauncher at "
+ std::to_string( iHour ) + ":"
+ ( iMinute < 10 ? "0" : "" ) + to_string( iMinute )
+ ( iMinute < 10 ? "0" : "" ) + std::to_string( iMinute )
+ " (" + asEvent1Name
+ ( asEvent2Name != "none" ? " / " + asEvent2Name : "" )
+ ")" ); // wyświetlenie czasu
@@ -316,8 +316,8 @@ TEventLauncher::export_as_text_( std::ostream &Output ) const {
<< "condition "
<< asMemCellName << ' '
<< szText << ' '
<< ( ( iCheckMask & basic_event::flags::value1 ) != 0 ? to_string( fVal1 ) : "*" ) << ' '
<< ( ( iCheckMask & basic_event::flags::value2 ) != 0 ? to_string( fVal2 ) : "*" ) << ' ';
<< ( ( iCheckMask & basic_event::flags::value1 ) != 0 ? std::to_string( fVal1 ) : "*" ) << ' '
<< ( ( iCheckMask & basic_event::flags::value2 ) != 0 ? std::to_string( fVal2 ) : "*" ) << ' ';
}
// footer
Output