From a1f3fd0497e2917af25163859de3ae961ebf1f78 Mon Sep 17 00:00:00 2001 From: Marc Celani Date: Thu, 7 Aug 2014 13:24:05 -0700 Subject: [PATCH] store ipaddresses in folly::IPAddress Summary: Save space and avoid extra mallocs Test Plan: fbconfig -r smc/zeus; fbmake runtests Reviewed By: henryf@fb.com Subscribers: zeus-diffs@ FB internal diff: D1476688 Tasks: 4832974 --- folly/IPAddress.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/IPAddress.h b/folly/IPAddress.h index e147c10d..6446836f 100644 --- a/folly/IPAddress.h +++ b/folly/IPAddress.h @@ -255,7 +255,7 @@ class IPAddress : boost::totally_ordered { bool empty() const { return (family_ == AF_UNSPEC); } // @return true if address is initialized - explicit operator bool() { return !empty(); } + explicit operator bool() const { return !empty(); } // @return true if this is an IPAddressV4 instance bool isV4() const { return (family_ == AF_INET); } -- 2.34.1