mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-28 22:47:28 +01:00
refactor(sonar): take read-only string parameters as std::string_view (cpp:S6009)
The Windows messaging helpers keep std::string, they need c_str().
This commit is contained in:
@@ -11,7 +11,7 @@ TTranscripts Transcripts;
|
||||
|
||||
// dodanie linii do tabeli, (show) i (hide) w [s] od aktualnego czasu
|
||||
void
|
||||
TTranscripts::AddLine( std::string const &txt, float show, float hide, bool it ) {
|
||||
TTranscripts::AddLine( std::string_view txt, float show, float hide, bool it ) {
|
||||
|
||||
if( show == hide ) { return; } // komentarz jest ignorowany
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
// constructors
|
||||
TTranscripts() = default;
|
||||
// methods
|
||||
void AddLine( std::string const &txt, float show, float hide, bool it );
|
||||
void AddLine( std::string_view txt, float show, float hide, bool it );
|
||||
// dodanie tekstów, długość dźwięku, czy istotne
|
||||
void Add( std::string const &txt, bool background = false );
|
||||
// usuwanie niepotrzebnych (ok. 10 razy na sekundę)
|
||||
|
||||
Reference in New Issue
Block a user