Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make bit_at function constexpr
  • Loading branch information
anonrig committed Sep 3, 2024
commit dc9140437e967d448386d683ed0700b9dd1a97f2
2 changes: 1 addition & 1 deletion include/ada/character_sets-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ constexpr uint8_t WWW_FORM_URLENCODED_PERCENT_ENCODE[32] = {
// F8 F9 FA FB FC FD FE FF
0x01 | 0x02 | 0x04 | 0x08 | 0x10 | 0x20 | 0x40 | 0x80};

ada_really_inline bool bit_at(const uint8_t a[], const uint8_t i) {
ada_really_inline constexpr bool bit_at(const uint8_t a[], const uint8_t i) {
return !!(a[i >> 3] & (1 << (i & 7)));
}

Expand Down
2 changes: 1 addition & 1 deletion include/ada/character_sets.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* @brief Includes the definitions for unicode character sets.
*/
namespace ada::character_sets {
ada_really_inline bool bit_at(const uint8_t a[], uint8_t i);
ada_really_inline constexpr bool bit_at(const uint8_t a[], uint8_t i);
} // namespace ada::character_sets

#endif // ADA_CHARACTER_SETS_H