Merge pull request #10183 from stiopaa1/msg_asyncmess_addConstToSetAddrUnknowns

msg/Messenger: add const and override to function

Reviewed-by: Haomai Wang <haomai@xsky.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
This commit is contained in:
Haomai Wang 2016-07-13 11:13:22 +08:00 committed by GitHub
commit 1143652f87
6 changed files with 6 additions and 6 deletions

View File

@ -240,7 +240,7 @@ public:
*
* @param addr The address to use as a template.
*/
virtual void set_addr_unknowns(entity_addr_t &addr) = 0;
virtual void set_addr_unknowns(const entity_addr_t &addr) = 0;
/// Get the default send priority.
int get_default_send_priority() { return default_send_priority; }
/**

View File

@ -762,7 +762,7 @@ void AsyncMessenger::submit_message(Message *m, AsyncConnectionRef con,
* If my_inst.addr doesn't have an IP set, this function
* will fill it in from the passed addr. Otherwise it does nothing and returns.
*/
void AsyncMessenger::set_addr_unknowns(entity_addr_t &addr)
void AsyncMessenger::set_addr_unknowns(const entity_addr_t &addr)
{
Mutex::Locker l(lock);
if (my_inst.addr.is_blank_ip()) {

View File

@ -156,7 +156,7 @@ public:
/** @defgroup Accessors
* @{
*/
void set_addr_unknowns(entity_addr_t& addr);
void set_addr_unknowns(const entity_addr_t &addr) override;
int get_dispatch_queue_len() {
return dispatch_queue.get_queue_len();

View File

@ -145,7 +145,7 @@ int SimpleMessenger::_send_message(Message *m, Connection *con)
* If my_inst.addr doesn't have an IP set, this function
* will fill it in from the passed addr. Otherwise it does nothing and returns.
*/
void SimpleMessenger::set_addr_unknowns(entity_addr_t &addr)
void SimpleMessenger::set_addr_unknowns(const entity_addr_t &addr)
{
if (my_inst.addr.is_blank_ip()) {
int port = my_inst.addr.get_port();

View File

@ -93,7 +93,7 @@ public:
/** @defgroup Accessors
* @{
*/
void set_addr_unknowns(entity_addr_t& addr);
void set_addr_unknowns(const entity_addr_t& addr) override;
int get_dispatch_queue_len() {
return dispatch_queue.get_queue_len();

View File

@ -95,7 +95,7 @@ public:
void *cb_user_context);
/* Messenger interface */
virtual void set_addr_unknowns(entity_addr_t &addr)
virtual void set_addr_unknowns(const entity_addr_t &addr) override
{ } /* XXX applicable? */
virtual int get_dispatch_queue_len()