From 3f3a9a156736d4da0339b3c2d9b042f4ed7c7fb2 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Fri, 3 Feb 2023 19:01:04 +0100 Subject: Refactor, removed a redundant function --- Examples/WhisperDesktop/TranscribeDlg.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'Examples/WhisperDesktop/TranscribeDlg.cpp') 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 -- cgit v1.2.3