From 0fb571e3b5043f136f2394d84b942b8c93fdde45 Mon Sep 17 00:00:00 2001 From: Dundar Göc Date: Mon, 11 Apr 2022 18:29:48 +0200 Subject: refactor: add pure attribute to pure functions This will allow compilers that support the pure attribute to make further optimizations to functions. --- src/nvim/diff.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/nvim/diff.c') 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; } -- cgit