diff options
author | Dundar Göc <gocdundar@gmail.com> | 2022-04-11 18:29:48 +0200 |
---|---|---|
committer | Dundar Göc <gocdundar@gmail.com> | 2022-04-13 22:12:12 +0200 |
commit | 0fb571e3b5043f136f2394d84b942b8c93fdde45 (patch) | |
tree | 897846d0a34979ccf7db46c53926aafaea437f9c /src/nvim/arabic.c | |
parent | 9a357043333cee38846a7a9a764cdae96d0856fd (diff) | |
download | rneovim-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/arabic.c')
-rw-r--r-- | src/nvim/arabic.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/arabic.c b/src/nvim/arabic.c index 5dcc3d3d0d..db78e0e68f 100644 --- a/src/nvim/arabic.c +++ b/src/nvim/arabic.c @@ -974,6 +974,7 @@ int arabic_shape(int c, int *ccp, int *c1p, int prev_c, int prev_c1, int next_c) /// @param one First character. /// @param two Character just after "one". bool arabic_combine(int one, int two) + FUNC_ATTR_PURE { if (one == a_LAM) { return arabic_maycombine(two); @@ -984,6 +985,7 @@ bool arabic_combine(int one, int two) /// Check whether we are dealing with a character that could be regarded as an /// Arabic combining character, need to check the character before this. bool arabic_maycombine(int two) + FUNC_ATTR_PURE { if (p_arshape && !p_tbidi) { return two == a_ALEF_MADDA |