From 172f8f9835c33c5532251b20c4b1ccdc0c4cdc8b Mon Sep 17 00:00:00 2001 From: "Alan M. Carroll" Date: Tue, 21 Nov 2023 16:44:21 -0600 Subject: [PATCH] IPAddr: make copy_to const --- code/include/swoc/IPAddr.h | 2 +- code/src/swoc_ip.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/include/swoc/IPAddr.h b/code/include/swoc/IPAddr.h index 690ee14..50d14af 100644 --- a/code/include/swoc/IPAddr.h +++ b/code/include/swoc/IPAddr.h @@ -579,7 +579,7 @@ class IPAddr { * @param sa Destination. * @return @a sa */ - sockaddr *copy_to(sockaddr *sa); + sockaddr *copy_to(sockaddr *sa) const; /** Parse a string and load the result in @a this. * diff --git a/code/src/swoc_ip.cc b/code/src/swoc_ip.cc index 67fc9fa..0ddc9bb 100644 --- a/code/src/swoc_ip.cc +++ b/code/src/swoc_ip.cc @@ -515,7 +515,7 @@ IPAddr::operator=(IPEndpoint const &addr) { } sockaddr * -IPAddr::copy_to(sockaddr *sa) { +IPAddr::copy_to(sockaddr *sa) const { if (this->is_ip4()) { _addr._ip4.copy_to(sa); } else if (this->is_ip6()) {