Refactor: Eliminate redundant operator<< calls

This commit is contained in:
Alex Turbov
2024-07-27 22:09:41 +04:00
parent 4fbeeb97aa
commit fc36ac6b22
2 changed files with 11 additions and 11 deletions

View File

@@ -80,7 +80,7 @@ void displayMessage(MessageType t, std::ostringstream& msg)
}
// Add a terminating blank line.
msg << "\n";
msg << '\n';
#if !defined(CMAKE_BOOTSTRAP)
// Add a C++ stack trace to internal errors.
@@ -90,7 +90,7 @@ void displayMessage(MessageType t, std::ostringstream& msg)
if (cmHasLiteralPrefix(stack, "WARNING:")) {
stack = "Note:" + stack.substr(8);
}
msg << stack << "\n";
msg << stack << '\n';
}
}
#endif
@@ -138,7 +138,7 @@ void PrintCallStack(std::ostream& out, cmListFileBacktrace bt,
if (topSource) {
lfc.FilePath = cmSystemTools::RelativeIfUnder(*topSource, lfc.FilePath);
}
out << " " << lfc << "\n";
out << " " << lfc << '\n';
}
}

View File

@@ -3025,10 +3025,10 @@ static cm::optional<bool> ChangeRPathELF(std::string const& file,
std::ostringstream e;
/* clang-format off */
e << "The current " << se_name << " is:\n"
<< " " << inRPath << "\n"
<< "which does not contain:\n"
<< " " << oldRPath << "\n"
<< "as was expected.";
" " << inRPath << "\n"
"which does not contain:\n"
" " << oldRPath << "\n"
"as was expected.";
/* clang-format on */
*emsg2 = e.str();
}
@@ -3112,10 +3112,10 @@ static cm::optional<bool> ChangeRPathXCOFF(std::string const& file,
std::ostringstream e;
/* clang-format off */
e << "The current RPATH is:\n"
<< " " << libPath << "\n"
<< "which does not contain:\n"
<< " " << oldRPath << "\n"
<< "as was expected.";
" " << libPath << "\n"
"which does not contain:\n"
" " << oldRPath << "\n"
"as was expected.";
/* clang-format on */
*emsg = e.str();
}