Fix unused-result warnings in the contains and parse_error examples (#5788)
contains(json_pointer) is marked JSON_HEDLEY_WARN_UNUSED_RESULT since #5477, and parse() has been for longer. The contains example ignored the result in two try blocks waiting for a parse_error that contains() never throws, so they printed nothing; print the result for those pointers instead. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
1 parent
3d7f554927
commit
d8dfc0d0f9
3 files changed
+8
-22
No files matched your search
@@ -5,3 +5,5 @@ true
|
||||
false
|
||||
false
|
||||
false
|
||||
false
|
||||
false
|
||||
Reference in new issue
Block a user