Forráskód Böngészése

properly minimize json output, reduce some leftover memory from readline#

Missingmew 5 éve
szülő
commit
be51024770
2 módosított fájl, 2 hozzáadás és 2 törlés
  1. 1 2
      cli/src/iomanager.cpp
  2. 1 0
      cli/src/useriomanager.cpp

+ 1 - 2
cli/src/iomanager.cpp

@@ -8,8 +8,7 @@ IoManager::IoManager(char *ipcstring) {
   ipstring = std::string(ipcstring);
   port = 1234;
   tcpsock = new tcp::socket(ios);
-  wbuilder.settings_["indentation"] = ""; // If you want whitespace-less output
-  rbuilder.settings_["indentation"] = ""; // If you want whitespace-less output
+  wbuilder.settings_["indentation"] = "";
   // const std::string output = Json::writeString(wbuilder, root);
   reader = rbuilder.newCharReader();
 }

+ 1 - 0
cli/src/useriomanager.cpp

@@ -323,6 +323,7 @@ void UserIoManager::run() {
     std::printf("\n");
   }
   free(line);
+  rl_clear_history();
 
   return;
 }