mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-01 12:18:36 -06:00
QtAutogen: Don't use std::i/ofstream::is_open()
This commit is contained in:
committed by
Brad King
parent
98665c3519
commit
43d77e1dad
@@ -390,13 +390,14 @@ bool cmQtAutoGenerators::WriteOldMocDefinitionsFile(
|
||||
{
|
||||
cmsys::ofstream outfile;
|
||||
outfile.open(filename.c_str(), std::ios::trunc);
|
||||
success = outfile.is_open();
|
||||
if (success) {
|
||||
if (outfile) {
|
||||
outfile << "set(AM_OLD_COMPILE_SETTINGS "
|
||||
<< cmOutputConverter::EscapeForCMake(
|
||||
this->CurrentCompileSettingsStr)
|
||||
<< ")\n";
|
||||
success = outfile.good();
|
||||
} else {
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1116,7 +1117,7 @@ bool cmQtAutoGenerators::GenerateMocFiles(
|
||||
if (success) {
|
||||
cmsys::ofstream outfile;
|
||||
outfile.open(this->OutMocCppFilenameAbs.c_str(), std::ios::trunc);
|
||||
if (!outfile.is_open()) {
|
||||
if (!outfile) {
|
||||
success = false;
|
||||
std::ostringstream err;
|
||||
err << "AUTOGEN: error opening " << this->OutMocCppFilenameAbs << "\n";
|
||||
|
||||
Reference in New Issue
Block a user