aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/digraph.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/digraph.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/digraph.c')
-rw-r--r--src/nvim/digraph.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/digraph.c b/src/nvim/digraph.c
index 083c868607..0e148543aa 100644
--- a/src/nvim/digraph.c
+++ b/src/nvim/digraph.c
@@ -1551,6 +1551,7 @@ int get_digraph(bool cmdline)
/// @return If no match, return "char2". If "meta_char" is true and "char1"
// is a space, return "char2" | 0x80.
static int getexactdigraph(int char1, int char2, bool meta_char)
+ FUNC_ATTR_PURE
{
int retval = 0;
@@ -1601,6 +1602,7 @@ static int getexactdigraph(int char1, int char2, bool meta_char)
///
/// @return The digraph.
int digraph_get(int char1, int char2, bool meta_char)
+ FUNC_ATTR_PURE
{
int retval;