Commit 9432d632 authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook Github Bot

Let IPAddressV4::bitCount and IPAddressV6::bitCount be constexpr

Summary: [Folly] Let `IPAddressV4::bitCount` and `IPAddressV6::bitCount` be `constexpr`.

Reviewed By: meyering

Differential Revision: D5589954

fbshipit-source-id: f4208efd62e71f47a7c87bdc8ddd421f93413c29
parent 0b856bd5
...@@ -140,7 +140,7 @@ class IPAddressV4 { ...@@ -140,7 +140,7 @@ class IPAddressV4 {
* @see IPAddress#bitCount * @see IPAddress#bitCount
* @returns 32 * @returns 32
*/ */
static size_t bitCount() { static constexpr size_t bitCount() {
return 32; return 32;
} }
......
...@@ -173,7 +173,7 @@ class IPAddressV6 { ...@@ -173,7 +173,7 @@ class IPAddressV6 {
* @see IPAddress#bitCount * @see IPAddress#bitCount
* @returns 128 * @returns 128
*/ */
static size_t bitCount() { static constexpr size_t bitCount() {
return 128; return 128;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment