Mumps coverage: directly pass std::string as argument

This commit is contained in:
Rolf Eike Beer 2020-03-19 00:07:35 +01:00
parent dc21177461
commit d1e6ee6fe3
6 changed files with 9 additions and 9 deletions

View File

@ -19,7 +19,7 @@ cmParseCacheCoverage::cmParseCacheCoverage(
{
}
bool cmParseCacheCoverage::LoadCoverageData(const char* d)
bool cmParseCacheCoverage::LoadCoverageData(std::string const& d)
{
// load all the .mcov files in the specified directory
cmsys::Directory dir;

View File

@ -26,7 +26,7 @@ public:
protected:
// implement virtual from parent
bool LoadCoverageData(const char* dir) override;
bool LoadCoverageData(std::string const& dir) override;
// remove files with no coverage
void RemoveUnCoveredFiles();
// Read a single mcov file

View File

@ -19,7 +19,7 @@ cmParseGTMCoverage::cmParseGTMCoverage(cmCTestCoverageHandlerContainer& cont,
{
}
bool cmParseGTMCoverage::LoadCoverageData(const char* d)
bool cmParseGTMCoverage::LoadCoverageData(std::string const& d)
{
// load all the .mcov files in the specified directory
cmsys::Directory dir;

View File

@ -25,7 +25,7 @@ public:
protected:
// implement virtual from parent
bool LoadCoverageData(const char* dir) override;
bool LoadCoverageData(std::string const& dir) override;
// Read a single mcov file
bool ReadMCovFile(const char* f);
// find out what line in a mumps file (filepath) the given entry point

View File

@ -39,9 +39,9 @@ bool cmParseMumpsCoverage::ReadCoverageFile(const char* file)
std::string type = line.substr(0, pos);
std::string path = line.substr(pos + 1);
if (type == "packages") {
this->LoadPackages(path.c_str());
this->LoadPackages(path);
} else if (type == "coverage_dir") {
this->LoadCoverageData(path.c_str());
this->LoadCoverageData(path);
} else {
cmCTestLog(this->CTest, ERROR_MESSAGE,
"Parse Error in Mumps coverage file :\n"
@ -105,7 +105,7 @@ void cmParseMumpsCoverage::InitializeMumpsFile(std::string& file)
}
}
bool cmParseMumpsCoverage::LoadPackages(const char* d)
bool cmParseMumpsCoverage::LoadPackages(std::string const& d)
{
cmsys::Glob glob;
glob.RecurseOn();

View File

@ -29,10 +29,10 @@ public:
protected:
// sub classes will use this to
// load all coverage files found in the given directory
virtual bool LoadCoverageData(const char* d) = 0;
virtual bool LoadCoverageData(std::string const& d) = 0;
// search the package directory for mumps files and fill
// in the RoutineToDirectory map
bool LoadPackages(const char* dir);
bool LoadPackages(std::string const& dir);
// initialize the coverage information for a single mumps file
void InitializeMumpsFile(std::string& file);
// Find mumps file for routine