aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer_updates.c
diff options
context:
space:
mode:
authorDundar Göc <gocdundar@gmail.com>2022-04-11 18:29:48 +0200
committerDundar Göc <gocdundar@gmail.com>2022-04-13 22:12:12 +0200
commit0fb571e3b5043f136f2394d84b942b8c93fdde45 (patch)
tree897846d0a34979ccf7db46c53926aafaea437f9c /src/nvim/buffer_updates.c
parent9a357043333cee38846a7a9a764cdae96d0856fd (diff)
downloadrneovim-0fb571e3b5043f136f2394d84b942b8c93fdde45.tar.gz
rneovim-0fb571e3b5043f136f2394d84b942b8c93fdde45.tar.bz2
rneovim-0fb571e3b5043f136f2394d84b942b8c93fdde45.zip
refactor: add pure attribute to pure functions
This will allow compilers that support the pure attribute to make further optimizations to functions.
Diffstat (limited to 'src/nvim/buffer_updates.c')
-rw-r--r--src/nvim/buffer_updates.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/buffer_updates.c b/src/nvim/buffer_updates.c
index ee1b7ebc95..3e2d04b3a2 100644
--- a/src/nvim/buffer_updates.c
+++ b/src/nvim/buffer_updates.c
@@ -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);
}