Add an always_inline, with explanatory comment

This commit is contained in:
2024-06-28 19:55:33 -07:00
parent d3f4afa167
commit 648b0b9238

View File

@@ -1848,8 +1848,11 @@ bool scan16(const InternalVersionT *vs, const uint8_t *is, int begin, int end,
}
// Returns true if v[i] <= readVersion for all i such that begin <= i < end
bool scan16(const InternalVersionT *vs, int begin, int end,
InternalVersionT readVersion) {
//
// always_inline So that we can optimize when begin or end is a constant.
__attribute((always_inline)) bool scan16(const InternalVersionT *vs, int begin,
int end,
InternalVersionT readVersion) {
assert(0 <= begin && begin < 16);
assert(0 <= end && end <= 16);
assert(begin <= end);