Merge pull request #975 from simdjson/dlemire/nitpicking_amal_demo

Nitpicking: demo should not crash on missing input
This commit is contained in:
Daniel Lemire 2020-06-24 17:18:40 -04:00 committed by GitHub
commit a4ebdfd47c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -132,6 +132,7 @@ cat <<< '
int main(int argc, char *argv[]) {
if(argc < 2) {
std::cerr << "Please specify at least one file name. " << std::endl;
return EXIT_FAILURE;
}
const char * filename = argv[1];
simdjson::dom::parser parser;

View File

@ -6,6 +6,7 @@
int main(int argc, char *argv[]) {
if(argc < 2) {
std::cerr << "Please specify at least one file name. " << std::endl;
return EXIT_FAILURE;
}
const char * filename = argv[1];
simdjson::dom::parser parser;
@ -42,4 +43,3 @@ int main(int argc, char *argv[]) {
}
return EXIT_SUCCESS;
}