diff --git a/lib/analyzerinfo.cpp b/lib/analyzerinfo.cpp index 299285acb..70a3a3afb 100644 --- a/lib/analyzerinfo.cpp +++ b/lib/analyzerinfo.cpp @@ -67,9 +67,9 @@ void AnalyzerInformation::writeFilesTxt(const std::string &buildDir, const std:: void AnalyzerInformation::close() { analyzerInfoFile.clear(); - if (fout.is_open()) { - fout << "\n"; - fout.close(); + if (mOutputStream.is_open()) { + mOutputStream << "\n"; + mOutputStream.close(); } } @@ -137,10 +137,10 @@ bool AnalyzerInformation::analyzeFile(const std::string &buildDir, const std::st if (skipAnalysis(analyzerInfoFile, checksum, errors)) return false; - fout.open(analyzerInfoFile); - if (fout.is_open()) { - fout << "\n"; - fout << "\n"; + mOutputStream.open(analyzerInfoFile); + if (mOutputStream.is_open()) { + mOutputStream << "\n"; + mOutputStream << "\n"; } else { 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*/) { - if (fout.is_open()) - fout << msg.toXML() << '\n'; + if (mOutputStream.is_open()) + mOutputStream << msg.toXML() << '\n'; } void AnalyzerInformation::setFileInfo(const std::string &check, const std::string &fileInfo) { - if (fout.is_open() && !fileInfo.empty()) - fout << " \n" << fileInfo << " \n"; + if (mOutputStream.is_open() && !fileInfo.empty()) + mOutputStream << " \n" << fileInfo << " \n"; } diff --git a/lib/analyzerinfo.h b/lib/analyzerinfo.h index 3c239d2e3..f3fdf0d13 100644 --- a/lib/analyzerinfo.h +++ b/lib/analyzerinfo.h @@ -58,7 +58,7 @@ public: 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); private: - std::ofstream fout; + std::ofstream mOutputStream; std::string analyzerInfoFile; };