Skip to content

Commit e65cb9e

Browse files
ChALkeRanonrig
andauthored
fixup!: constexpr
Co-authored-by: Yagiz Nizipli <yagiz@nizipli.com>
1 parent 8cb0b72 commit e65cb9e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/nbytes.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ const int8_t unhex_table[256] = {
157157
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
158158
-1, -1, -1, -1, -1, -1, -1, -1, -1};
159159

160-
inline char nibble(uint8_t x) { return x + '0' + ((x > 9) * 39); }
160+
inline constexpr char nibble(uint8_t x) {
161+
return x + '0' + ((x > 9) * 39);
162+
}
161163

162164
size_t HexEncode(const char *src, size_t slen, char *dst, size_t dlen) {
163165
// We know how much we'll write, just make sure that there's space.

0 commit comments

Comments
 (0)