summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Long <ryan.long@oarcorp.com>2021-09-22 14:53:12 -0400
committerJoel Sherrill <joel@rtems.org>2021-12-07 10:49:34 -0600
commit18759092e17422bf290f95f52243a73fd16d867f (patch)
tree3be7391c85d3a253d5e8ab1427b3cb4d2967ef04
parentExecutableInfo.h: Fix formatting (diff)
downloadrtems-tools-18759092e17422bf290f95f52243a73fd16d867f.tar.bz2
Explanations: Convert to C++
-rw-r--r--tester/covoar/Explanations.cc10
-rw-r--r--tester/covoar/Explanations.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/tester/covoar/Explanations.cc b/tester/covoar/Explanations.cc
index 4142418..028c00e 100644
--- a/tester/covoar/Explanations.cc
+++ b/tester/covoar/Explanations.cc
@@ -27,14 +27,14 @@ namespace Coverage {
}
void Explanations::load(
- const char* const explanations
+ const std::string& explanations
)
{
std::ifstream explain;
Explanation e;
int line = 1;
- if (!explanations)
+ if (explanations.empty())
return;
explain.open( explanations );
@@ -121,13 +121,13 @@ namespace Coverage {
}
void Explanations::writeNotFound(
- const char* const fileName
+ const std::string& fileName
)
{
std::ofstream notFoundFile;
bool notFoundOccurred = false;
- if (!fileName)
+ if (fileName.empty())
return;
notFoundFile.open( fileName );
@@ -151,7 +151,7 @@ namespace Coverage {
}
if (!notFoundOccurred) {
- if (!unlink( fileName )) {
+ if (!unlink( fileName.c_str())) {
std::cerr << "Warning: Unable to unlink " << fileName
<< std::endl
<< std::endl;
diff --git a/tester/covoar/Explanations.h b/tester/covoar/Explanations.h
index de0c051..ca7c749 100644
--- a/tester/covoar/Explanations.h
+++ b/tester/covoar/Explanations.h
@@ -88,7 +88,7 @@ namespace Coverage {
* the explanation information
*/
void load(
- const char* const explanations
+ const std::string& explanations
);
/*!
@@ -109,7 +109,7 @@ namespace Coverage {
* @param[in] fileName specifies the name of the file to write
*/
void writeNotFound(
- const char* const fileName
+ const std::string& fileName
);
};