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:
Dundar Göc
2022-04-11 18:29:48 +02:00
parent 9a35704333
commit 0fb571e3b5
8 changed files with 21 additions and 0 deletions

View File

@@ -2604,6 +2604,7 @@ char_u *getexline(int c, void *cookie, int indent, bool do_concat)
}
bool cmdline_overstrike(void)
FUNC_ATTR_PURE
{
return ccline.overstrike;
}
@@ -2611,6 +2612,7 @@ bool cmdline_overstrike(void)
/// Return true if the cursor is at the end of the cmdline.
bool cmdline_at_end(void)
FUNC_ATTR_PURE
{
return (ccline.cmdpos >= ccline.cmdlen);
}