add const to two variables

Change-Id: I97374ccbf118baa59425346ffc439036a4482bf4
This commit is contained in:
Vincent Rabaud 2017-08-07 23:02:15 +02:00
parent 46efe062b8
commit 24ad2e3c99

View File

@ -609,8 +609,10 @@ static int BackwardReferencesLz77Box(int xsize, int ysize,
// Figure out if we should use the offset/length from the previous pixel
// as an initial guess and therefore only inspect the offsets in
// window_offsets_new[].
int use_prev = (best_length_prev > 1) && (best_length_prev < MAX_LENGTH);
int num_ind = use_prev ? window_offsets_new_size : window_offsets_size;
const int use_prev =
(best_length_prev > 1) && (best_length_prev < MAX_LENGTH);
const int num_ind =
use_prev ? window_offsets_new_size : window_offsets_size;
best_length = use_prev ? best_length_prev - 1 : 0;
best_offset = use_prev ? best_offset_prev : 0;
// Find the longest match in a window around the pixel.