diff options
author | Chih-Hung Hsieh <chh@google.com> | 2016-08-12 15:49:55 -0700 |
---|---|---|
committer | Chih-hung Hsieh <chh@google.com> | 2016-08-23 16:26:55 +0000 |
commit | 8a019dd0040bedf5078e4d18e06a244a675b80e8 (patch) | |
tree | cc88ba631054cc7f3fce148e6491a943f94746a5 /tools | |
parent | cdfbd158dc4b4ca807105703dd3ea4f1b1dd8588 (diff) | |
download | libbcc-8a019dd0040bedf5078e4d18e06a244a675b80e8.tar.gz |
Fix clang-tidy warnings in libbcc.
These are proposed changes, looking for upstream changes.
* Add explicit keyword to conversion constructors.
Bug: 28341362
* Use const reference type for read-only parameters.
Bug: 30407689
* Use const reference type for loop index variables to avoid unnecessary copy.
Bug: 30413223
* Use faster overloaded string find function.
Bug: 30411878
Test: build with WITH_TIDY=1
Change-Id: I2a083651ba7aa7cb1b88fb84738d7caf37b4f511
Diffstat (limited to 'tools')
-rw-r--r-- | tools/bcc/Main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/bcc/Main.cpp b/tools/bcc/Main.cpp index 941b49c..1181e43 100644 --- a/tools/bcc/Main.cpp +++ b/tools/bcc/Main.cpp @@ -161,7 +161,7 @@ void extractSourcesAndSlots(const llvm::cl::list<std::string>& optList, std::list<std::list<std::pair<int, int>>>* sourcesAndSlots) { for (unsigned i = 0; i < optList.size(); ++i) { std::string plan = optList[i]; - unsigned found = plan.find(":"); + unsigned found = plan.find(':'); std::string name = plan.substr(0, found); std::cerr << "new kernel name: " << name << std::endl; @@ -171,7 +171,7 @@ void extractSourcesAndSlots(const llvm::cl::list<std::string>& optList, std::string s; std::list<std::pair<int, int>> planList; while (getline(iss, s, '.')) { - found = s.find(","); + found = s.find(','); std::string sourceStr = s.substr(0, found); std::string slotStr = s.substr(found + 1); |