add const

This commit is contained in:
zhujingxuan 2021-04-23 10:23:22 +08:00
parent 5fe72ea838
commit 449c8689d1
1 changed files with 1 additions and 1 deletions

View File

@ -33,7 +33,7 @@ static inline bool compare(int i, int j, const float *scores) {
static void heapify(const float *scores, int *indexes, int n, int i) {
while (i < n) {
int cur = i;
int l = 2 * i + 1;
const int l = 2 * i + 1;
const int r = 2 * i + 2;
if (r < n && compare(indexes[cur], indexes[r], scores)) {
cur = r;