浏览代码

LibGfx/CCITT: Make `get_code_from_table` take a generic `Array`

Lucas CHOLLET 1 年之前
父节点
当前提交
3d63dd5c53
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Userland/Libraries/LibGfx/ImageFormats/CCITTDecoder.cpp

+ 2 - 2
Userland/Libraries/LibGfx/ImageFormats/CCITTDecoder.cpp

@@ -237,8 +237,8 @@ constexpr Array common_make_up_codes = {
     Code { 2560, 12, 0b000000011111 },
     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) {
     for (auto const& code : array) {
         if (code.code_length == code_size && code.code == code_word)
         if (code.code_length == code_size && code.code == code_word)