From bd1cb0c8e3a04baa411dc12c1325b6a9f12ee7f4 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Wed, 21 May 2025 13:23:20 +0200 Subject: [PATCH] whisper : remove redundant assignments (#3178) This commit removes some redundant assignments in the function `whisper_exp_compute_token_level_timestamps`. The motivations for this is that tokens[j] and token are references to the same object and this can be a little confusing when reading the code. --- src/whisper.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/whisper.cpp b/src/whisper.cpp index 8bad4d13..cb887d45 100644 --- a/src/whisper.cpp +++ b/src/whisper.cpp @@ -8397,12 +8397,6 @@ static void whisper_exp_compute_token_level_timestamps( const int64_t tt = t_beg + 2*(token.tid - whisper_token_beg(&ctx)); - tokens[j].id = token.id; - tokens[j].tid = token.tid; - tokens[j].p = token.p; - tokens[j].pt = token.pt; - tokens[j].ptsum = token.ptsum; - tokens[j].vlen = voice_length(whisper_token_to_str(&ctx, token.id)); if (token.pt > thold_pt && token.ptsum > thold_ptsum && token.tid > tid_last && tt <= t1) {