Commit 5dd82a6f authored by Pavel Pimenov's avatar Pavel Pimenov

[libzmq] const string p -> const string& p (#860)

parent e436073b
...@@ -133,7 +133,7 @@ int zmq::mechanism_t::parse_metadata (const unsigned char *ptr_, ...@@ -133,7 +133,7 @@ int zmq::mechanism_t::parse_metadata (const unsigned char *ptr_,
return 0; return 0;
} }
int zmq::mechanism_t::property (const std::string /* name_ */, int zmq::mechanism_t::property (const std::string& /* name_ */,
const void * /* value_ */, size_t /* length_ */) const void * /* value_ */, size_t /* length_ */)
{ {
// Default implementation does not check // Default implementation does not check
...@@ -141,7 +141,7 @@ int zmq::mechanism_t::property (const std::string /* name_ */, ...@@ -141,7 +141,7 @@ int zmq::mechanism_t::property (const std::string /* name_ */,
return 0; return 0;
} }
bool zmq::mechanism_t::check_socket_type (const std::string type_) const bool zmq::mechanism_t::check_socket_type (const std::string& type_) const
{ {
switch (options.type) { switch (options.type) {
case ZMQ_REQ: case ZMQ_REQ:
......
...@@ -86,7 +86,7 @@ namespace zmq ...@@ -86,7 +86,7 @@ namespace zmq
// parsing remaining data. // parsing remaining data.
// Derived classes are supposed to override this // Derived classes are supposed to override this
// method to handle custom processing. // method to handle custom processing.
virtual int property (const std::string name_, virtual int property (const std::string& name_,
const void *value_, size_t length_); const void *value_, size_t length_);
options_t options; options_t options;
...@@ -99,7 +99,7 @@ namespace zmq ...@@ -99,7 +99,7 @@ namespace zmq
// Returns true iff socket associated with the mechanism // Returns true iff socket associated with the mechanism
// is compatible with a given socket type 'type_'. // is compatible with a given socket type 'type_'.
bool check_socket_type (const std::string type_) const; bool check_socket_type (const std::string& type_) const;
}; };
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment