diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2020-03-22 14:29:43 (GMT) |
---|---|---|
committer | Alex Turbov <i.zaufi@gmail.com> | 2020-03-24 13:32:05 (GMT) |
commit | 1e4b5c7d090fc77daa2aaede0bd57d476e3f45ed (patch) | |
tree | 0215a0628dc36e38956f2fea531916f71a5d093b /Source/cmExtraEclipseCDT4Generator.cxx | |
parent | 7099db5dd48d36e5d39ab17219278d834c8a88a7 (diff) | |
download | CMake-1e4b5c7d090fc77daa2aaede0bd57d476e3f45ed.zip CMake-1e4b5c7d090fc77daa2aaede0bd57d476e3f45ed.tar.gz CMake-1e4b5c7d090fc77daa2aaede0bd57d476e3f45ed.tar.bz2 |
Refactor: Avoid `std::endl` where it's not necessary (part 2)
The `std::endl` manipulator, except inserting `\n` character, also
performs `os.flush()`, which may lead to undesired effects (like
disk I/O in the middle of forming data strings). For the
`std::stringstream` it also has no meaning.
* replace multiple `operator<<` calls on a string literal w/
the only call and the only (bigger) string literal;
* replace one character string literal used in `operator<<`
w/ a char literal.
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r-- | Source/cmExtraEclipseCDT4Generator.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx index 8ab30c0..2a146f3 100644 --- a/Source/cmExtraEclipseCDT4Generator.cxx +++ b/Source/cmExtraEclipseCDT4Generator.cxx @@ -187,10 +187,10 @@ void cmExtraEclipseCDT4Generator::CreateSettingsResourcePrefsFile() return; } - fout << "eclipse.preferences.version=1" << std::endl; + fout << "eclipse.preferences.version=1\n"; const char* encoding = mf->GetDefinition("CMAKE_ECLIPSE_RESOURCE_ENCODING"); if (encoding) { - fout << "encoding/<project>=" << encoding << std::endl; + fout << "encoding/<project>=" << encoding << '\n'; } } |