From 5dd82a6fa6f9075a4a9e8359d657ce08eee5ea46 Mon Sep 17 00:00:00 2001 From: Pavel Pimenov Date: Wed, 29 Jan 2014 15:58:53 +0400 Subject: [PATCH] [libzmq] const string p -> const string& p (#860) --- src/mechanism.cpp | 4 ++-- src/mechanism.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mechanism.cpp b/src/mechanism.cpp index fd34bc0f..85d96905 100644 --- a/src/mechanism.cpp +++ b/src/mechanism.cpp @@ -133,7 +133,7 @@ int zmq::mechanism_t::parse_metadata (const unsigned char *ptr_, 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_ */) { // Default implementation does not check @@ -141,7 +141,7 @@ int zmq::mechanism_t::property (const std::string /* name_ */, 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) { case ZMQ_REQ: diff --git a/src/mechanism.hpp b/src/mechanism.hpp index 2e40d8fd..9f60423f 100644 --- a/src/mechanism.hpp +++ b/src/mechanism.hpp @@ -86,7 +86,7 @@ namespace zmq // parsing remaining data. // Derived classes are supposed to override this // 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_); options_t options; @@ -99,7 +99,7 @@ namespace zmq // Returns true iff socket associated with the mechanism // 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; }; }