diff options
author | David Robillard <d@drobilla.net> | 2024-06-24 15:01:11 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-06-25 15:54:43 -0400 |
commit | 47f30703ee6935de393303b7a4d6bab8ce7780f4 (patch) | |
tree | 3f0a8ed8c40bb2970962c5f3c62e17f654d59263 /src/string_utils.h | |
parent | 032abfdff61056a7029a440fc1895bbe41ec964a (diff) | |
download | serd-47f30703ee6935de393303b7a4d6bab8ce7780f4.tar.gz serd-47f30703ee6935de393303b7a4d6bab8ce7780f4.tar.bz2 serd-47f30703ee6935de393303b7a4d6bab8ce7780f4.zip |
Replace questionable switch statements with shorter conditionals
Diffstat (limited to 'src/string_utils.h')
-rw-r--r-- | src/string_utils.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/string_utils.h b/src/string_utils.h index 4babee63..2ce90ac9 100644 --- a/src/string_utils.h +++ b/src/string_utils.h @@ -51,17 +51,7 @@ is_xdigit(const int c) static inline bool is_space(const char c) { - switch (c) { - case ' ': - case '\f': - case '\n': - case '\r': - case '\t': - case '\v': - return true; - default: - return false; - } + return c == ' ' || (c >= '\t' && c <= '\r'); } static inline bool |