Merge pull request #110 from NanXiao/patch-1

Fix build warning
This commit is contained in:
geofflangdale 2019-03-07 17:58:12 +11:00 committed by GitHub
commit 5dc47ac0ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -8,7 +8,9 @@ int main() {
if( ! pj.isValid() ) {
return EXIT_FAILURE;
}
pj.allocateCapacity(p.size());
if( ! pj.allocateCapacity(p.size()) ) {
return EXIT_FAILURE;
}
const int res = json_parse(p, pj);
if (res) {
std::cerr << simdjson::errorMsg(res) << std::endl;