refactor: add pure attribute to pure functions

This will allow compilers that support the pure attribute to make
further optimizations to functions.
This commit is contained in:
Dundar Göc
2022-04-11 18:29:48 +02:00
parent 9a35704333
commit 0fb571e3b5
8 changed files with 21 additions and 0 deletions

View File

@@ -84,6 +84,7 @@ bool buf_updates_register(buf_T *buf, uint64_t channel_id, BufUpdateCallbacks cb
}
bool buf_updates_active(buf_T *buf)
FUNC_ATTR_PURE
{
return kv_size(buf->update_channels) || kv_size(buf->update_callbacks);
}