Merge topic 'base64-constref'

82fbf490 cmCTestTestHandler: take reference to temporary string instead of doing a copy
This commit is contained in:
Brad King 2014-12-23 08:53:56 -05:00 committed by CMake Topic Stage
commit 23e9bc55f3

View File

@ -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\">"