diff options
author | Rolf Eike Beer <eike@sf-mail.de> | 2014-12-22 20:38:59 (GMT) |
---|---|---|
committer | Rolf Eike Beer <eike@sf-mail.de> | 2014-12-22 20:38:59 (GMT) |
commit | 82fbf490b56e0b070cbcfaf1568c496340cd6e8a (patch) | |
tree | 0b1665b838d0f22e44db077b914a113804d02881 /Source/CTest | |
parent | 66977652309f4d754bc1b4603475569db40e4f77 (diff) | |
download | CMake-82fbf490b56e0b070cbcfaf1568c496340cd6e8a.zip CMake-82fbf490b56e0b070cbcfaf1568c496340cd6e8a.tar.gz CMake-82fbf490b56e0b070cbcfaf1568c496340cd6e8a.tar.bz2 |
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.
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index f330e58..a058501 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1317,7 +1317,7 @@ void cmCTestTestHandler::AttachFiles(std::ostream& os, result->Properties->AttachedFiles.begin(); 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); os << "\t\t<NamedMeasurement name=\"Attached File\" encoding=\"base64\" " "compression=\"tar/gzip\" filename=\"" << fname << "\" type=\"file\">" |