apache / incubator-pegasus

Apache Pegasus - A horizontally scalable, strongly consistent and high-performance key-value store
https://pegasus.apache.org/
Apache License 2.0
1.97k stars 314 forks source link

refactor(FQDN): Use operator bool to simplify code #1974

Closed acelyc111 closed 5 months ago

acelyc111 commented 5 months ago

Remove the duplicate functions bool is_invalid() const, they are replaced by operator bool() const, the latter is more simple.

Hide s_invalid_address and s_invalid_host_port in private scope, they are replaced by operator bool() const as well.