aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.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/diff.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/diff.c')
-rw-r--r--src/nvim/diff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index 0b55fb877c..9e8fa2e62d 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -883,6 +883,7 @@ theend:
/// diff will be used anyway.
///
int diff_internal(void)
+ FUNC_ATTR_PURE
{
return (diff_flags & DIFF_INTERNAL) != 0 && *p_dex == NUL;
}
@@ -2250,6 +2251,7 @@ bool diffopt_horizontal(void)
// Return true if 'diffopt' contains "hiddenoff".
bool diffopt_hiddenoff(void)
+ FUNC_ATTR_PURE
{
return (diff_flags & DIFF_HIDDEN_OFF) != 0;
}