Skip to content

Commit e07cd73

Browse files
committed
vad : fix leaning (none) of pointer/references
1 parent 466d5b5 commit e07cd73

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/whisper.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7891,7 +7891,7 @@ int whisper_full_lang_id(struct whisper_context * ctx) {
78917891
return ctx->state->lang_id;
78927892
}
78937893

7894-
static int64_t map_processed_to_original_time(int64_t processed_time, const std::vector<vad_time_mapping>& mapping_table) {
7894+
static int64_t map_processed_to_original_time(int64_t processed_time, const std::vector<vad_time_mapping> & mapping_table) {
78957895
if (mapping_table.empty()) {
78967896
return processed_time;
78977897
}
@@ -7907,7 +7907,7 @@ static int64_t map_processed_to_original_time(int64_t processed_time, const std:
79077907
// Binary search over the time map that finds the first entry that has a
79087908
// processed time greater than or equal to the current processed time.
79097909
auto upper = std::lower_bound(mapping_table.begin(), mapping_table.end(), processed_time,
7910-
[](const vad_time_mapping& entry, int64_t time) {
7910+
[](const vad_time_mapping & entry, int64_t time) {
79117911
return entry.processed_time < time;
79127912
}
79137913
);
@@ -7933,7 +7933,7 @@ static int64_t map_processed_to_original_time(int64_t processed_time, const std:
79337933
}
79347934

79357935
// Function to get the starting timestamp of a segment
7936-
int64_t whisper_full_get_segment_t0_from_state(struct whisper_state* state, int i_segment) {
7936+
int64_t whisper_full_get_segment_t0_from_state(struct whisper_state * state, int i_segment) {
79377937
// If VAD wasn't used, return the original timestamp
79387938
if (!state->has_vad_segments || state->vad_mapping_table.empty()) {
79397939
return state->result_all[i_segment].t0;
@@ -7947,7 +7947,7 @@ int64_t whisper_full_get_segment_t0_from_state(struct whisper_state* state, int
79477947
}
79487948

79497949
// Function to get the ending timestamp of a segment
7950-
int64_t whisper_full_get_segment_t1_from_state(struct whisper_state* state, int i_segment) {
7950+
int64_t whisper_full_get_segment_t1_from_state(struct whisper_state * state, int i_segment) {
79517951
// If VAD wasn't used, return the original timestamp
79527952
if (!state->has_vad_segments || state->vad_mapping_table.empty()) {
79537953
return state->result_all[i_segment].t1;

0 commit comments

Comments
 (0)