1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:27:44 +00:00

AK: Make binary_search signature more generic.

This commit is contained in:
asynts 2020-12-29 16:13:16 +01:00 committed by Andreas Kling
parent 35c4338625
commit 50d24e4f98
6 changed files with 63 additions and 53 deletions

View file

@ -112,7 +112,7 @@ u32 CanonicalCode::read_symbol(InputBitStream& stream) const
// FIXME: This seems really inefficient, this could be an index into an array instead.
size_t index;
if (AK::binary_search(m_symbol_codes.span(), code_bits, AK::integral_compare<u32>, &index))
if (AK::binary_search(m_symbol_codes.span(), code_bits, &index))
return m_symbol_values[index];
}
}