diff options
author | Max Kellermann <max@musicpd.org> | 2019-01-21 21:18:23 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2019-01-21 21:18:23 +0100 |
commit | f6e1176f973768d85cf24015987693de310bcca7 (patch) | |
tree | dea56ff0d131362df447d6b40bc62c11f78c23bd /src/util | |
parent | e4700c0a27d3032d4b95fbc628caf88552d57340 (diff) |
util/CharUtil: remove redundant `inline` keywords from `constexpr` functions
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/CharUtil.hxx | 39 |
1 files changed, 13 insertions, 26 deletions
diff --git a/src/util/CharUtil.hxx b/src/util/CharUtil.hxx index 7c28b694c..c1e1c1489 100644 --- a/src/util/CharUtil.hxx +++ b/src/util/CharUtil.hxx @@ -34,29 +34,25 @@ #include "WCharUtil.hxx" #endif -constexpr -static inline bool +constexpr bool IsASCII(const unsigned char ch) { return ch < 0x80; } -constexpr -static inline bool +constexpr bool IsASCII(const char ch) { return IsASCII((unsigned char)ch); } -constexpr -static inline bool +constexpr bool IsWhitespaceOrNull(const char ch) { return (unsigned char)ch <= 0x20; } -constexpr -static inline bool +constexpr bool IsWhitespaceNotNull(const char ch) { return ch > 0 && ch <= 0x20; @@ -68,50 +64,43 @@ IsWhitespaceNotNull(const char ch) * want the fastest implementation, and you don't care if a null byte * matches. */ -constexpr -static inline bool +constexpr bool IsWhitespaceFast(const char ch) { return IsWhitespaceOrNull(ch); } -constexpr -static inline bool +constexpr bool IsPrintableASCII(char ch) { return (signed char)ch >= 0x20; } -constexpr -static inline bool +constexpr bool IsDigitASCII(char ch) { return ch >= '0' && ch <= '9'; } -constexpr -static inline bool +constexpr bool IsUpperAlphaASCII(char ch) { return ch >= 'A' && ch <= 'Z'; } -constexpr -static inline bool +constexpr bool IsLowerAlphaASCII(char ch) { return ch >= 'a' && ch <= 'z'; } -constexpr -static inline bool +constexpr bool IsAlphaASCII(char ch) { return IsUpperAlphaASCII(ch) || IsLowerAlphaASCII(ch); } -constexpr -static inline bool +constexpr bool IsAlphaNumericASCII(char ch) { return IsAlphaASCII(ch) || IsDigitASCII(ch); @@ -121,8 +110,7 @@ IsAlphaNumericASCII(char ch) * Convert the specified ASCII character (0x00..0x7f) to upper case. * Unlike toupper(), it ignores the system locale. */ -constexpr -static inline char +constexpr char ToUpperASCII(char ch) { return ch >= 'a' && ch <= 'z' @@ -134,8 +122,7 @@ ToUpperASCII(char ch) * Convert the specified ASCII character (0x00..0x7f) to lower case. * Unlike tolower(), it ignores the system locale. */ -constexpr -static inline char +constexpr char ToLowerASCII(char ch) { return ch >= 'A' && ch <= 'Z' |