mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 18:39:18 +02:00
Replace ExchangeCharInString with std::ranges::replace
This commit is contained in:
@@ -1600,7 +1600,9 @@ transcripts_panel::update() {
|
||||
|
||||
for( auto const &transcript : ui::Transcripts.aLines ) {
|
||||
if( Global.fTimeAngleDeg + ( transcript.fShow - Global.fTimeAngleDeg > 180 ? 360 : 0 ) < transcript.fShow ) { continue; }
|
||||
text_lines.emplace_back( ExchangeCharInString( transcript.asText, '|', ' ' ), colors::white );
|
||||
std::string text = transcript.asText;
|
||||
std::ranges::replace(text, '|', ' ');
|
||||
text_lines.emplace_back( text, colors::white );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@ TTranscripts::AddLine( std::string const &txt, float show, float hide, bool it )
|
||||
hide = Global.fTimeAngleDeg + hide / 240.0;
|
||||
|
||||
TTranscript transcript;
|
||||
transcript.asText = ExchangeCharInString( txt, '|', ' ' ); // NOTE: legacy transcript lines use | as new line mark
|
||||
transcript.asText = txt;
|
||||
std::ranges::replace(transcript.asText, '|', ' '); // NOTE: legacy transcript lines use | as new line mark
|
||||
transcript.fShow = show;
|
||||
transcript.fHide = hide;
|
||||
transcript.bItalic = it;
|
||||
|
||||
Reference in New Issue
Block a user