mirror of
https://github.com/google/brotli.git
synced 2024-11-23 20:20:07 +00:00
Fix minor syntax issues.
Missing semicolons. Move checks below variable declarations for c89. PiperOrigin-RevId: 624199887
This commit is contained in:
parent
a76d96e730
commit
709c4672d4
@ -557,7 +557,7 @@ static BROTLI_INLINE void FindCompoundDictionaryMatch(
|
|||||||
offset = distance_offset - distance;
|
offset = distance_offset - distance;
|
||||||
limit = source_size - offset;
|
limit = source_size - offset;
|
||||||
limit = limit > max_length ? max_length : limit;
|
limit = limit > max_length ? max_length : limit;
|
||||||
BROTLI_DCHECK(cur_ix_masked + limit <= ring_buffer_mask)
|
BROTLI_DCHECK(cur_ix_masked + limit <= ring_buffer_mask);
|
||||||
len = FindMatchLengthWithLimit(&source[offset], &data[cur_ix_masked],
|
len = FindMatchLengthWithLimit(&source[offset], &data[cur_ix_masked],
|
||||||
limit);
|
limit);
|
||||||
if (len >= 2) {
|
if (len >= 2) {
|
||||||
|
@ -203,12 +203,12 @@ static BROTLI_INLINE void FN(FindLongestMatch)(
|
|||||||
uint8_t* BROTLI_RESTRICT tiny_hashes = FN(TinyHash)(self->extra[0]);
|
uint8_t* BROTLI_RESTRICT tiny_hashes = FN(TinyHash)(self->extra[0]);
|
||||||
FN(Bank)* BROTLI_RESTRICT banks = FN(Banks)(self->extra[1]);
|
FN(Bank)* BROTLI_RESTRICT banks = FN(Banks)(self->extra[1]);
|
||||||
const size_t cur_ix_masked = cur_ix & ring_buffer_mask;
|
const size_t cur_ix_masked = cur_ix & ring_buffer_mask;
|
||||||
BROTLI_DCHECK(cur_ix_masked + max_length <= ring_buffer_mask)
|
|
||||||
/* Don't accept a short copy from far away. */
|
/* Don't accept a short copy from far away. */
|
||||||
score_t min_score = out->score;
|
score_t min_score = out->score;
|
||||||
score_t best_score = out->score;
|
score_t best_score = out->score;
|
||||||
size_t best_len = out->len;
|
size_t best_len = out->len;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
BROTLI_DCHECK(cur_ix_masked + max_length <= ring_buffer_mask);
|
||||||
const size_t key = FN(HashBytes)(&data[cur_ix_masked]);
|
const size_t key = FN(HashBytes)(&data[cur_ix_masked]);
|
||||||
const uint8_t tiny_hash = (uint8_t)(key);
|
const uint8_t tiny_hash = (uint8_t)(key);
|
||||||
out->len = 0;
|
out->len = 0;
|
||||||
|
@ -165,12 +165,12 @@ static BROTLI_INLINE void FN(FindLongestMatch)(
|
|||||||
uint16_t* BROTLI_RESTRICT num = self->num_;
|
uint16_t* BROTLI_RESTRICT num = self->num_;
|
||||||
uint32_t* BROTLI_RESTRICT buckets = self->buckets_;
|
uint32_t* BROTLI_RESTRICT buckets = self->buckets_;
|
||||||
const size_t cur_ix_masked = cur_ix & ring_buffer_mask;
|
const size_t cur_ix_masked = cur_ix & ring_buffer_mask;
|
||||||
BROTLI_DCHECK(cur_ix_masked + max_length <= ring_buffer_mask)
|
|
||||||
/* Don't accept a short copy from far away. */
|
/* Don't accept a short copy from far away. */
|
||||||
score_t min_score = out->score;
|
score_t min_score = out->score;
|
||||||
score_t best_score = out->score;
|
score_t best_score = out->score;
|
||||||
size_t best_len = out->len;
|
size_t best_len = out->len;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
BROTLI_DCHECK(cur_ix_masked + max_length <= ring_buffer_mask);
|
||||||
out->len = 0;
|
out->len = 0;
|
||||||
out->len_code_delta = 0;
|
out->len_code_delta = 0;
|
||||||
/* Try last distance first. */
|
/* Try last distance first. */
|
||||||
|
@ -164,12 +164,12 @@ static BROTLI_INLINE void FN(FindLongestMatch)(
|
|||||||
uint16_t* BROTLI_RESTRICT num = self->num_;
|
uint16_t* BROTLI_RESTRICT num = self->num_;
|
||||||
uint32_t* BROTLI_RESTRICT buckets = self->buckets_;
|
uint32_t* BROTLI_RESTRICT buckets = self->buckets_;
|
||||||
const size_t cur_ix_masked = cur_ix & ring_buffer_mask;
|
const size_t cur_ix_masked = cur_ix & ring_buffer_mask;
|
||||||
BROTLI_DCHECK(cur_ix_masked + max_length <= ring_buffer_mask)
|
|
||||||
/* Don't accept a short copy from far away. */
|
/* Don't accept a short copy from far away. */
|
||||||
score_t min_score = out->score;
|
score_t min_score = out->score;
|
||||||
score_t best_score = out->score;
|
score_t best_score = out->score;
|
||||||
size_t best_len = out->len;
|
size_t best_len = out->len;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
BROTLI_DCHECK(cur_ix_masked + max_length <= ring_buffer_mask);
|
||||||
out->len = 0;
|
out->len = 0;
|
||||||
out->len_code_delta = 0;
|
out->len_code_delta = 0;
|
||||||
/* Try last distance first. */
|
/* Try last distance first. */
|
||||||
|
Loading…
Reference in New Issue
Block a user