mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
refactor: add pure attribute to pure functions
This will allow compilers that support the pure attribute to make further optimizations to functions.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user