Merge \"Fix clang-tidy performance warnings in simpleperf.\"
am: 43b194dc15
Change-Id: Ie7206846246bd50fbc758e972b83596bcacb3faf
diff --git a/simpleperf/cmd_report_test.cpp b/simpleperf/cmd_report_test.cpp
index e0b35bf..0dbf779 100644
--- a/simpleperf/cmd_report_test.cpp
+++ b/simpleperf/cmd_report_test.cpp
@@ -37,13 +37,13 @@
class ReportCommandTest : public ::testing::Test {
protected:
void Report(
- const std::string perf_data,
+ const std::string& perf_data,
const std::vector<std::string>& add_args = std::vector<std::string>()) {
ReportRaw(GetTestData(perf_data), add_args);
}
void ReportRaw(
- const std::string perf_data,
+ const std::string& perf_data,
const std::vector<std::string>& add_args = std::vector<std::string>()) {
success = false;
std::vector<std::string> args = {
@@ -134,7 +134,7 @@
bool found = false;
for (size_t i = 0; i + 2 < lines.size(); ++i) {
if (lines[i].find("GlobalFunc") != std::string::npos &&
- lines[i + 1].find("|") != std::string::npos &&
+ lines[i + 1].find('|') != std::string::npos &&
lines[i + 2].find("main") != std::string::npos) {
found = true;
break;
@@ -147,7 +147,7 @@
bool found = false;
for (size_t i = 0; i + 2 < lines.size(); ++i) {
if (lines[i].find("main") != std::string::npos &&
- lines[i + 1].find("|") != std::string::npos &&
+ lines[i + 1].find('|') != std::string::npos &&
lines[i + 2].find("GlobalFunc") != std::string::npos) {
found = true;
break;