mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:57:35 +00:00
LibGfx/CCITT: Make get_code_from_table
take a generic Array
This commit is contained in:
parent
d54dbdae5e
commit
3d63dd5c53
1 changed files with 2 additions and 2 deletions
|
@ -237,8 +237,8 @@ constexpr Array common_make_up_codes = {
|
|||
Code { 2560, 12, 0b000000011111 },
|
||||
};
|
||||
|
||||
template<size_t Size>
|
||||
Optional<Code> get_code_from_table(Array<Code, Size> const& array, u16 code_word, u8 code_size)
|
||||
template<typename T, size_t Size>
|
||||
Optional<T> get_code_from_table(Array<T, Size> const& array, u16 code_word, u8 code_size)
|
||||
{
|
||||
for (auto const& code : array) {
|
||||
if (code.code_length == code_size && code.code == code_word)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue