@@ -92,7 +92,7 @@ class SocketWrapper {
92
92
connected_(false ),
93
93
sending_(false ) { }
94
94
95
- void Connect (std::string host, int port, bool v6 = false ) {
95
+ void Connect (const std::string& host, int port, bool v6 = false ) {
96
96
closed_ = false ;
97
97
connection_failed_ = false ;
98
98
connected_ = false ;
@@ -114,7 +114,7 @@ class SocketWrapper {
114
114
ReadCallback);
115
115
}
116
116
117
- void ExpectFailureToConnect (std::string host, int port) {
117
+ void ExpectFailureToConnect (const std::string& host, int port) {
118
118
connected_ = false ;
119
119
connection_failed_ = false ;
120
120
closed_ = false ;
@@ -243,7 +243,7 @@ class ServerHolder {
243
243
: ServerHolder(has_targets, loop, HOST, port, nullptr ) { }
244
244
245
245
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);
247
247
248
248
InspectorSocketServer* operator ->() {
249
249
return server_.get ();
@@ -350,7 +350,7 @@ class TestSocketServerDelegate : public SocketServerDelegate {
350
350
};
351
351
352
352
ServerHolder::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) {
354
354
std::vector<std::string> targets;
355
355
if (has_targets)
356
356
targets = { MAIN_TARGET_ID };
0 commit comments