diff options
| author | Chih-Hung Hsieh <chh@google.com> | 2016-07-28 16:38:15 -0700 |
|---|---|---|
| committer | Chih-Hung Hsieh <chh@google.com> | 2016-07-28 16:38:15 -0700 |
| commit | 07a477881b99dc4b5c6700993f855bf8fc8b973c (patch) | |
| tree | 1540066ee5bf930281c08c4fd07ce311d1486b05 /fastboot/socket_test.cpp | |
| parent | 53e6bc7394d0063800cf33a30a8f13215e5be775 (diff) | |
Fix clang-tidy performance warnings in syste/core.
* Use const reference type for parameters to avoid unnecessary copy.
* Suppress warning of not using faster overloaded string find function.
Bug: 30407689
Bug: 30411878
Change-Id: Ie79dbe21899867bc62031f8618bb1322b8071525
Test: build with WITH_TIDY=1
Diffstat (limited to 'fastboot/socket_test.cpp')
| -rw-r--r-- | fastboot/socket_test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fastboot/socket_test.cpp b/fastboot/socket_test.cpp index affbdfd885..373abc35e8 100644 --- a/fastboot/socket_test.cpp +++ b/fastboot/socket_test.cpp @@ -34,7 +34,7 @@ static constexpr int kTestTimeoutMs = 3000; // Creates connected sockets |server| and |client|. Returns true on success. bool MakeConnectedSockets(Socket::Protocol protocol, std::unique_ptr<Socket>* server, std::unique_ptr<Socket>* client, - const std::string hostname = "localhost") { + const std::string& hostname = "localhost") { *server = Socket::NewServer(protocol, 0); if (*server == nullptr) { ADD_FAILURE() << "Failed to create server."; |
