cmCTestTestHandler: take reference to temporary string instead of doing a copy
This will increase the lifetime of the temporary until the end of the function.
This commit is contained in:
parent
6697765230
commit
82fbf490b5
|
@ -1317,7 +1317,7 @@ void cmCTestTestHandler::AttachFiles(std::ostream& os,
|
||||||
result->Properties->AttachedFiles.begin();
|
result->Properties->AttachedFiles.begin();
|
||||||
file != result->Properties->AttachedFiles.end(); ++file)
|
file != result->Properties->AttachedFiles.end(); ++file)
|
||||||
{
|
{
|
||||||
std::string base64 = this->CTest->Base64GzipEncodeFile(*file);
|
const std::string &base64 = this->CTest->Base64GzipEncodeFile(*file);
|
||||||
std::string fname = cmSystemTools::GetFilenameName(*file);
|
std::string fname = cmSystemTools::GetFilenameName(*file);
|
||||||
os << "\t\t<NamedMeasurement name=\"Attached File\" encoding=\"base64\" "
|
os << "\t\t<NamedMeasurement name=\"Attached File\" encoding=\"base64\" "
|
||||||
"compression=\"tar/gzip\" filename=\"" << fname << "\" type=\"file\">"
|
"compression=\"tar/gzip\" filename=\"" << fname << "\" type=\"file\">"
|
||||||
|
|
Loading…
Reference in New Issue