Skip to content

Commit

Permalink
refactor: Improve readability of lead_byte_length function
Browse files Browse the repository at this point in the history
  • Loading branch information
royshil committed Jul 18, 2024
1 parent 4cf6f3d commit 087fe5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/whisper-utils/whisper-utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ void start_whisper_thread_with_path(struct cleanstream_data *gf, const std::stri
gf->whisper_thread.swap(new_whisper_thread);
}

#define is_lead_byte(c) (((c)&0xe0) == 0xc0 || ((c)&0xf0) == 0xe0 || ((c)&0xf8) == 0xf0)
#define is_trail_byte(c) (((c)&0xc0) == 0x80)
#define is_lead_byte(c) (((c) & 0xe0) == 0xc0 || ((c) & 0xf0) == 0xe0 || ((c) & 0xf8) == 0xf0)
#define is_trail_byte(c) (((c) & 0xc0) == 0x80)

inline int lead_byte_length(const uint8_t c)
{
Expand Down

0 comments on commit 087fe5c

Please sign in to comment.