|
22 | 22 | #include "mdcomp/bitstream.hh" |
23 | 23 | #include "mdcomp/ignore_unused_variable_warning.hh" |
24 | 24 | #include "mdcomp/lzss.hh" |
| 25 | +#include "mdcomp/unreachable.hh" |
25 | 26 |
|
26 | 27 | #include <array> |
27 | 28 | #include <cstddef> |
@@ -100,7 +101,7 @@ class kosinski_internal { |
100 | 101 | case invalid: |
101 | 102 | return std::numeric_limits<size_t>::max(); |
102 | 103 | } |
103 | | - __builtin_unreachable(); |
| 104 | + utils::unreachable(); |
104 | 105 | } |
105 | 106 |
|
106 | 107 | // Given an edge type, computes how many bits are used in total by this |
@@ -129,7 +130,7 @@ class kosinski_internal { |
129 | 130 | case invalid: |
130 | 131 | return std::numeric_limits<size_t>::max(); |
131 | 132 | } |
132 | | - __builtin_unreachable(); |
| 133 | + utils::unreachable(); |
133 | 134 | } |
134 | 135 |
|
135 | 136 | // Kosinski finds no additional matches over normal LZSS. |
@@ -200,7 +201,7 @@ class kosinski_internal { |
200 | 201 | distance = std::streamoff{0x100} - source.get_byte(); |
201 | 202 | } |
202 | 203 |
|
203 | | - auto const length = static_cast<diff_t>(count); |
| 204 | + auto const length = static_cast<diff_t>(count); |
204 | 205 | lzss_copy<kosinski_adaptor>(dest, distance, length); |
205 | 206 | } |
206 | 207 | } |
@@ -264,7 +265,7 @@ class kosinski_internal { |
264 | 265 | // This should be unreachable. |
265 | 266 | std::cerr << "Compression produced invalid edge type " |
266 | 267 | << static_cast<size_t>(edge.get_type()) << '\n'; |
267 | | - __builtin_unreachable(); |
| 268 | + utils::unreachable(); |
268 | 269 | } |
269 | 270 | } |
270 | 271 | } |
|
0 commit comments