diff options
| author | Konstantin <const@const.me> | 2023-02-03 19:01:04 +0100 |
|---|---|---|
| committer | Konstantin <const@const.me> | 2023-02-03 19:01:04 +0100 |
| commit | 3f3a9a156736d4da0339b3c2d9b042f4ed7c7fb2 (patch) | |
| tree | c3a4ba4291cb9fd6fae27d1e86c5ec26578aa6a2 /Examples/WhisperDesktop/TranscribeDlg.cpp | |
| parent | 3ba8e6389679007445f4fc1c52439cb0df3ddba0 (diff) | |
Refactor, removed a redundant function
Diffstat (limited to 'Examples/WhisperDesktop/TranscribeDlg.cpp')
| -rw-r--r-- | Examples/WhisperDesktop/TranscribeDlg.cpp | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/Examples/WhisperDesktop/TranscribeDlg.cpp b/Examples/WhisperDesktop/TranscribeDlg.cpp index 19772e2..d20c0c8 100644 --- a/Examples/WhisperDesktop/TranscribeDlg.cpp +++ b/Examples/WhisperDesktop/TranscribeDlg.cpp @@ -455,18 +455,6 @@ namespace return S_OK; } - void printTime( CStringA& rdi, Whisper::sTimeSpan time, bool comma ) - { - Whisper::sTimeSpanFields fields = time; - const char separator = comma ? ',' : '.'; - rdi.AppendFormat( "%02d:%02d:%02d%c%03d", - (int)fields.hours, - (int)fields.minutes, - (int)fields.seconds, - separator, - fields.ticks / 10'000 ); - } - const char* skipBlank( const char* rsi ) { while( true ) @@ -497,9 +485,9 @@ HRESULT TranscribeDlg::writeTextFile( const sSegment* const segments, const size if( timestamps ) { line = "["; - printTimeStamp( line, seg.time.begin ); + printTime( line, seg.time.begin ); line += " --> "; - printTimeStamp( line, seg.time.end ); + printTime( line, seg.time.end ); line += "] "; } else |
