[lldb/Interpreter] Remove redundant argument (NFC)
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 3 Jun 2020 04:21:20 +0000 (21:21 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 3 Jun 2020 04:23:19 +0000 (21:23 -0700)
lldb/source/Interpreter/CommandReturnObject.cpp

index efeac6d..a0ede45 100644 (file)
 using namespace lldb;
 using namespace lldb_private;
 
-static void DumpStringToStreamWithNewline(Stream &strm, const std::string &s,
-                                          bool add_newline_if_empty) {
+static void DumpStringToStreamWithNewline(Stream &strm, const std::string &s) {
   bool add_newline = false;
-  if (s.empty()) {
-    add_newline = add_newline_if_empty;
-  } else {
+  if (!s.empty()) {
     // We already checked for empty above, now make sure there is a newline in
     // the error, and if there isn't one, add one.
     strm.Write(s.c_str(), s.size());
@@ -50,7 +47,7 @@ void CommandReturnObject::AppendErrorWithFormat(const char *format, ...) {
   if (!s.empty()) {
     Stream &error_strm = GetErrorStream();
     error_strm.PutCString("error: ");
-    DumpStringToStreamWithNewline(error_strm, s, false);
+    DumpStringToStreamWithNewline(error_strm, s);
   }
 }