File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -1206,13 +1206,14 @@ class ChromeLogger {
1206
1206
std::string dir = utils::GetEnv (" UNITRACE_TraceOutputDir" );
1207
1207
chrome_trace_file_name_ = (dir + ' /' + chrome_trace_file_name_);
1208
1208
}
1209
- std::string tmpString;
1209
+
1210
1210
if (this ->CheckOption (TRACE_KERNEL_NAME_FILTER)) {
1211
1211
if (this ->CheckOption (TRACE_K_NAME_FILTER_IN)) {
1212
1212
filter_in_ = true ;
1213
1213
}
1214
+ std::string tmpString;
1214
1215
tmpString = utils::GetEnv (" UNITRACE_TraceKernelString" );
1215
- filter_strings_set_.insert (tmpString);
1216
+ filter_strings_set_.insert (std::move ( tmpString) );
1216
1217
} else if (this ->CheckOption (TRACE_K_NAME_FILTER_FILE)) {
1217
1218
if (this ->CheckOption (TRACE_K_NAME_FILTER_IN)) {
1218
1219
filter_in_ = true ;
@@ -1221,8 +1222,9 @@ class ChromeLogger {
1221
1222
std::ifstream kfile (kernel_file, std::ios::in);
1222
1223
PTI_ASSERT (kfile.fail () != 1 && kfile.eof () != 1 );
1223
1224
while (!kfile.eof ()) {
1225
+ std::string tmpString;
1224
1226
kfile >> tmpString;
1225
- filter_strings_set_.insert (tmpString);
1227
+ filter_strings_set_.insert (std::move ( tmpString) );
1226
1228
}
1227
1229
} else {
1228
1230
filtering_on_ = false ;
Original file line number Diff line number Diff line change @@ -1022,7 +1022,7 @@ class ZeMetricProfiler {
1022
1022
if (!units.empty ()) {
1023
1023
name += " [" + units + " ]" ;
1024
1024
}
1025
- name_list.push_back (name);
1025
+ name_list.push_back (std::move ( name) );
1026
1026
}
1027
1027
1028
1028
return name_list;
You can’t perform that action at this time.
0 commit comments