@@ -92,7 +92,7 @@ class SocketWrapper {
9292 connected_(false ),
9393 sending_(false ) { }
9494
95- void Connect (std::string host, int port, bool v6 = false ) {
95+ void Connect (const std::string& host, int port, bool v6 = false ) {
9696 closed_ = false ;
9797 connection_failed_ = false ;
9898 connected_ = false ;
@@ -114,7 +114,7 @@ class SocketWrapper {
114114 ReadCallback);
115115 }
116116
117- void ExpectFailureToConnect (std::string host, int port) {
117+ void ExpectFailureToConnect (const std::string& host, int port) {
118118 connected_ = false ;
119119 connection_failed_ = false ;
120120 closed_ = false ;
@@ -243,7 +243,7 @@ class ServerHolder {
243243 : ServerHolder(has_targets, loop, HOST, port, nullptr ) { }
244244
245245 ServerHolder (bool has_targets, uv_loop_t * loop,
246- const std::string host, int port, FILE* out);
246+ const std::string& host, int port, FILE* out);
247247
248248 InspectorSocketServer* operator ->() {
249249 return server_.get ();
@@ -350,7 +350,7 @@ class TestSocketServerDelegate : public SocketServerDelegate {
350350};
351351
352352ServerHolder::ServerHolder (bool has_targets, uv_loop_t * loop,
353- const std::string host, int port, FILE* out) {
353+ const std::string& host, int port, FILE* out) {
354354 std::vector<std::string> targets;
355355 if (has_targets)
356356 targets = { MAIN_TARGET_ID };
0 commit comments