diff options
author | David Robillard <d@drobilla.net> | 2019-10-27 21:58:21 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-10-27 22:41:34 +0100 |
commit | a76b091f673a27996e62bf270942a500f41a096c (patch) | |
tree | 51278446d0887b13389a1c56495a8110766abae0 /src/reader.c | |
parent | f7ffff1e75634909da60ea63a7c52f1a001220b8 (diff) | |
download | serd-a76b091f673a27996e62bf270942a500f41a096c.tar.gz serd-a76b091f673a27996e62bf270942a500f41a096c.tar.bz2 serd-a76b091f673a27996e62bf270942a500f41a096c.zip |
Simplify syntax dispatch condition
This avoids the Wswitch-enum warning in clang.
Diffstat (limited to 'src/reader.c')
-rw-r--r-- | src/reader.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/reader.c b/src/reader.c index d63c2734..68a5f886 100644 --- a/src/reader.c +++ b/src/reader.c @@ -159,10 +159,8 @@ read_statement(SerdReader* reader) static bool read_doc(SerdReader* reader) { - switch (reader->syntax) { - case SERD_NQUADS: return read_nquadsDoc(reader); - default: return read_turtleTrigDoc(reader); - } + return ((reader->syntax == SERD_NQUADS) ? read_nquadsDoc(reader) + : read_turtleTrigDoc(reader)); } SerdReader* |