github-actions[bot] commented on code in PR #14063: URL: https://github.com/apache/doris/pull/14063#discussion_r1105194832
########## be/src/util/network_util.cpp: ########## @@ -38,23 +37,19 @@ namespace doris { -InetAddress::InetAddress(struct sockaddr* addr) { - this->addr = *(struct sockaddr_in*)addr; -} +InetAddress::InetAddress(std::string ip, sa_family_t family, bool is_loopback) + : _ip_addr(ip), _family(family), _is_loopback(is_loopback) {} -bool InetAddress::is_address_v4() const { - return addr.sin_family == AF_INET; +bool InetAddress::is_loopback() { Review Comment: warning: method 'is_loopback' can be made const [readability-make-member-function-const] ```suggestion bool InetAddress::is_loopback() const { ``` be/src/util/network_util.h:32: ```diff - bool is_loopback(); + bool is_loopback() const; ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org