@@ -76,23 +76,23 @@ class MDNSResponder {
76
76
void addService (const char *service, const char *proto, uint16_t port){
77
77
addService ((char *)service, (char *)proto, port);
78
78
}
79
- void addService (String service, String proto, uint16_t port){
79
+ void addService (const String& service, const String& proto, uint16_t port){
80
80
addService (service.c_str (), proto.c_str (), port);
81
81
}
82
82
83
83
bool addServiceTxt (char *name, char *proto, char * key, char * value);
84
84
bool addServiceTxt (const char *name, const char *proto, const char *key,const char * value){
85
85
return addServiceTxt ((char *)name, (char *)proto, (char *)key, (char *)value);
86
86
}
87
- bool addServiceTxt (String name, String proto, String key, String value){
87
+ bool addServiceTxt (const String& name, const String& proto, const String& key, const String& value){
88
88
return addServiceTxt (name.c_str (), proto.c_str (), key.c_str (), value.c_str ());
89
89
}
90
90
91
91
int queryService (char *service, char *proto);
92
92
int queryService (const char *service, const char *proto){
93
93
return queryService ((char *)service, (char *)proto);
94
94
}
95
- int queryService (String service, String proto){
95
+ int queryService (const String& service, const String& proto){
96
96
return queryService (service.c_str (), proto.c_str ());
97
97
}
98
98
String hostname (int idx);
0 commit comments