Rename private member fout

This commit is contained in:
Daniel Marjamäki 2018-06-17 08:09:59 +02:00
parent b12b7f93e4
commit 9085373494
2 changed files with 12 additions and 12 deletions

View File

@ -67,9 +67,9 @@ void AnalyzerInformation::writeFilesTxt(const std::string &buildDir, const std::
void AnalyzerInformation::close() void AnalyzerInformation::close()
{ {
analyzerInfoFile.clear(); analyzerInfoFile.clear();
if (fout.is_open()) { if (mOutputStream.is_open()) {
fout << "</analyzerinfo>\n"; mOutputStream << "</analyzerinfo>\n";
fout.close(); mOutputStream.close();
} }
} }
@ -137,10 +137,10 @@ bool AnalyzerInformation::analyzeFile(const std::string &buildDir, const std::st
if (skipAnalysis(analyzerInfoFile, checksum, errors)) if (skipAnalysis(analyzerInfoFile, checksum, errors))
return false; return false;
fout.open(analyzerInfoFile); mOutputStream.open(analyzerInfoFile);
if (fout.is_open()) { if (mOutputStream.is_open()) {
fout << "<?xml version=\"1.0\"?>\n"; mOutputStream << "<?xml version=\"1.0\"?>\n";
fout << "<analyzerinfo checksum=\"" << checksum << "\">\n"; mOutputStream << "<analyzerinfo checksum=\"" << checksum << "\">\n";
} else { } else {
analyzerInfoFile.clear(); analyzerInfoFile.clear();
} }
@ -150,12 +150,12 @@ bool AnalyzerInformation::analyzeFile(const std::string &buildDir, const std::st
void AnalyzerInformation::reportErr(const ErrorLogger::ErrorMessage &msg, bool /*verbose*/) void AnalyzerInformation::reportErr(const ErrorLogger::ErrorMessage &msg, bool /*verbose*/)
{ {
if (fout.is_open()) if (mOutputStream.is_open())
fout << msg.toXML() << '\n'; mOutputStream << msg.toXML() << '\n';
} }
void AnalyzerInformation::setFileInfo(const std::string &check, const std::string &fileInfo) void AnalyzerInformation::setFileInfo(const std::string &check, const std::string &fileInfo)
{ {
if (fout.is_open() && !fileInfo.empty()) if (mOutputStream.is_open() && !fileInfo.empty())
fout << " <FileInfo check=\"" << check << "\">\n" << fileInfo << " </FileInfo>\n"; mOutputStream << " <FileInfo check=\"" << check << "\">\n" << fileInfo << " </FileInfo>\n";
} }

View File

@ -58,7 +58,7 @@ public:
void setFileInfo(const std::string &check, const std::string &fileInfo); void setFileInfo(const std::string &check, const std::string &fileInfo);
static std::string getAnalyzerInfoFile(const std::string &buildDir, const std::string &sourcefile, const std::string &cfg); static std::string getAnalyzerInfoFile(const std::string &buildDir, const std::string &sourcefile, const std::string &cfg);
private: private:
std::ofstream fout; std::ofstream mOutputStream;
std::string analyzerInfoFile; std::string analyzerInfoFile;
}; };