diff options
author | dundargoc <gocdundar@gmail.com> | 2023-12-18 10:55:23 +0100 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-12-21 17:38:42 +0100 |
commit | af93a74a0f4afa9a3a4f55ffdf28141eaf776d22 (patch) | |
tree | 76068552bf3a74b4170ecd7b087905c96ddd6f8f /src/nvim/ascii_defs.h | |
parent | ade42d531bcc9ca61facfb0524128a8a9f9b2444 (diff) | |
download | rneovim-af93a74a0f4afa9a3a4f55ffdf28141eaf776d22.tar.gz rneovim-af93a74a0f4afa9a3a4f55ffdf28141eaf776d22.tar.bz2 rneovim-af93a74a0f4afa9a3a4f55ffdf28141eaf776d22.zip |
refactor: run IWYU on entire repo
Reference: https://github.com/neovim/neovim/issues/6371.
Diffstat (limited to 'src/nvim/ascii_defs.h')
-rw-r--r-- | src/nvim/ascii_defs.h | 50 |
1 files changed, 21 insertions, 29 deletions
diff --git a/src/nvim/ascii_defs.h b/src/nvim/ascii_defs.h index 3de04cd9fa..4215157654 100644 --- a/src/nvim/ascii_defs.h +++ b/src/nvim/ascii_defs.h @@ -86,35 +86,6 @@ static inline bool ascii_iswhite(int c) REAL_FATTR_CONST REAL_FATTR_ALWAYS_INLINE; - -static inline bool ascii_iswhite_or_nul(int c) - REAL_FATTR_CONST - REAL_FATTR_ALWAYS_INLINE; - -static inline bool ascii_isdigit(int c) - REAL_FATTR_CONST - REAL_FATTR_ALWAYS_INLINE; - -static inline bool ascii_isxdigit(int c) - REAL_FATTR_CONST - REAL_FATTR_ALWAYS_INLINE; - -static inline bool ascii_isident(int c) - REAL_FATTR_CONST - REAL_FATTR_ALWAYS_INLINE; - -static inline bool ascii_isbdigit(int c) - REAL_FATTR_CONST - REAL_FATTR_ALWAYS_INLINE; - -static inline bool ascii_isodigit(int c) - REAL_FATTR_CONST - REAL_FATTR_ALWAYS_INLINE; - -static inline bool ascii_isspace(int c) - REAL_FATTR_CONST - REAL_FATTR_ALWAYS_INLINE; - /// Checks if `c` is a space or tab character. /// /// @see {ascii_isdigit} @@ -123,6 +94,9 @@ static inline bool ascii_iswhite(int c) return c == ' ' || c == '\t'; } +static inline bool ascii_iswhite_or_nul(int c) + REAL_FATTR_CONST + REAL_FATTR_ALWAYS_INLINE; /// Checks if `c` is a space or tab character or NUL. /// /// @see {ascii_isdigit} @@ -131,6 +105,9 @@ static inline bool ascii_iswhite_or_nul(int c) return ascii_iswhite(c) || c == NUL; } +static inline bool ascii_isdigit(int c) + REAL_FATTR_CONST + REAL_FATTR_ALWAYS_INLINE; /// Check whether character is a decimal digit. /// /// Library isdigit() function is officially locale-dependent and, for @@ -145,6 +122,9 @@ static inline bool ascii_isdigit(int c) return c >= '0' && c <= '9'; } +static inline bool ascii_isxdigit(int c) + REAL_FATTR_CONST + REAL_FATTR_ALWAYS_INLINE; /// Checks if `c` is a hexadecimal digit, that is, one of 0-9, a-f, A-F. /// /// @see {ascii_isdigit} @@ -155,6 +135,9 @@ static inline bool ascii_isxdigit(int c) || (c >= 'A' && c <= 'F'); } +static inline bool ascii_isident(int c) + REAL_FATTR_CONST + REAL_FATTR_ALWAYS_INLINE; /// Checks if `c` is an “identifier” character /// /// That is, whether it is alphanumeric character or underscore. @@ -163,6 +146,9 @@ static inline bool ascii_isident(int c) return ASCII_ISALNUM(c) || c == '_'; } +static inline bool ascii_isbdigit(int c) + REAL_FATTR_CONST + REAL_FATTR_ALWAYS_INLINE; /// Checks if `c` is a binary digit, that is, 0-1. /// /// @see {ascii_isdigit} @@ -171,6 +157,9 @@ static inline bool ascii_isbdigit(int c) return (c == '0' || c == '1'); } +static inline bool ascii_isodigit(int c) + REAL_FATTR_CONST + REAL_FATTR_ALWAYS_INLINE; /// Checks if `c` is an octal digit, that is, 0-7. /// /// @see {ascii_isdigit} @@ -179,6 +168,9 @@ static inline bool ascii_isodigit(int c) return (c >= '0' && c <= '7'); } +static inline bool ascii_isspace(int c) + REAL_FATTR_CONST + REAL_FATTR_ALWAYS_INLINE; /// Checks if `c` is a white-space character, that is, /// one of \f, \n, \r, \t, \v. /// |