diff options
| author | George Hazan <george.hazan@gmail.com> | 2023-08-08 14:17:20 +0300 |
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2023-08-08 14:17:20 +0300 |
| commit | f76923b10ff0ad1c29615afa2104719adfa4a762 (patch) | |
| tree | cd15bfb2333798c8ccf3b9e2cfc8fe226491da03 /plugins | |
| parent | 4a0246ea3f385396d2c596c9622d0d6716275e35 (diff) | |
code cleaning
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/NewStory/src/history_dlg.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/NewStory/src/history_dlg.cpp b/plugins/NewStory/src/history_dlg.cpp index 26ab8cc06c..250c2b3bab 100644 --- a/plugins/NewStory/src/history_dlg.cpp +++ b/plugins/NewStory/src/history_dlg.cpp @@ -751,9 +751,8 @@ public: pHist.set_name("history"); pRoot.push_back(pHist); - std::string output = pRoot.write_formatted(); - fputs(output.c_str(), out); - fseek(out, -3, SEEK_CUR); + fputs(pRoot.write_formatted().c_str(), out); + fseek(out, -4, SEEK_CUR); // export events bool bAppendOnly = false; @@ -764,7 +763,7 @@ public: continue; if (bAppendOnly) { - fseek(out, -3, SEEK_END); + fseek(out, -4, SEEK_END); fputs(",", out); } @@ -791,9 +790,8 @@ public: if (msg) pRoot2.push_back(JSONNode("body", T2Utf(msg).get())); - output = pRoot2.write_formatted(); - output += "\n]}"; - fputs(output.c_str(), out); + fputs(pRoot2.write_formatted().c_str(), out); + fputs("\n]}", out); bAppendOnly = true; } |
