From ffd718e581221f036f4646480f3f187392c81e5c Mon Sep 17 00:00:00 2001 From: Onur Rauf Bingol Date: Thu, 18 Apr 2019 14:29:21 -0500 Subject: [PATCH] Fix typo --- src/on2json/on2json.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/on2json/on2json.cpp b/src/on2json/on2json.cpp index 46c93a7..7a5669a 100644 --- a/src/on2json/on2json.cpp +++ b/src/on2json/on2json.cpp @@ -154,17 +154,17 @@ std::string on2json_run(std::string &fileName, Config &cfg) fnameSave = fileName.substr(0, fileName.find_last_of(".")) + ".json"; std::ofstream fileSave(fnameSave.c_str(), std::ios::out); if (!fileSave) - { - // Save JSON string to the file - fileSave << jsonString << std::endl; - fileSave.close(); - } - else { if (!cfg.silent()) std::cout << "[ERROR] Cannot open file '" << fnameSave << "' for writing!" << std::endl; fnameSave.clear(); } + else + { + // Save JSON string to the file + fileSave << jsonString << std::endl; + fileSave.close(); + } } return fnameSave;