mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-27 11:21:02 +08:00
cleaner
This commit is contained in:
parent
942e2c999a
commit
05810a7607
@ -257,21 +257,20 @@ int main(int argc, const char* argv[]) {
|
||||
Json::Value root;
|
||||
exitCode = parseAndSaveValueTree(
|
||||
input, actualPath, "input", root, features, parseOnly);
|
||||
if (exitCode != 0 || parseOnly) {
|
||||
if (exitCode || parseOnly) {
|
||||
return exitCode;
|
||||
}
|
||||
std::string rewrite;
|
||||
exitCode = rewriteValueTree(rewritePath, root, rewrite);
|
||||
if (exitCode =! 0) {
|
||||
if (exitCode) {
|
||||
return exitCode;
|
||||
}
|
||||
Json::Value rewriteRoot;
|
||||
exitCode = parseAndSaveValueTree(rewrite,
|
||||
rewriteActualPath,
|
||||
"rewrite",
|
||||
rewriteRoot,
|
||||
features,
|
||||
parseOnly);
|
||||
exitCode = parseAndSaveValueTree(
|
||||
rewrite, rewriteActualPath, "rewrite", rewriteRoot, features, parseOnly);
|
||||
if (exitCode) {
|
||||
return exitCode;
|
||||
}
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
printf("Unhandled exception:\n%s\n", e.what());
|
||||
|
Loading…
x
Reference in New Issue
Block a user