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

@@ -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;