cpp/src/phonenumbers/phonenumberutil.cc
// Note: DescHasData must account for any of MetadataFilter's
// excludableChildFields potentially being absent from the metadata. It must
// check them all. For any changes in DescHasData, ensure that all the
// excludableChildFields are still being checked. If your change is safe simply
// mention why during a review without needing to change MetadataFilter.
// Returns true if there is any data set for a particular PhoneNumberDesc.
DescHasData must account for any of MetadataFilter's
excludableChildFields potentially being absent from the metadata. It must
check them all. For any changes in DescHasData, ensure that all the
excludableChildFields are still being checked. If your change is safe simply
mention why during a review without needing to change MetadataFilter.
Returns true if there is any data set for a particular PhoneNumberDesc.
DescHasData must account for any of MetadataFilter ' s excludableChildFields potentially being absent from the metadata . It must check them all . For any changes in DescHasData ensure that all the excludableChildFields are still being checked . If your change is safe simply mention why during a review without needing to change MetadataFilter . Returns true if there is any data set for a particular PhoneNumberDesc .
bool DescHasData(const PhoneNumberDesc& desc) {
  return desc.has_example_number() || DescHasPossibleNumberData(desc) ||
         desc.has_national_number_pattern();
}
bool DescHasData ( const PhoneNumberDesc & desc ) { return desc . has_example_number ( ) || DescHasPossibleNumberData ( desc ) || desc . has_national_number_pattern ( ) ; }
Note: DescHasData must account for any of MetadataFilter's
excludableChildFields potentially being absent from the metadata.
Note : DescHasData must account for any of MetadataFilter ' s excludableChildFields potentially being absent from the metadata .
// Checking most properties since we don't know what's present, since a custom // build may have stripped just one of them (e.g. USE_METADATA_LITE strips // exampleNumber). We don't bother checking the PossibleLengthsLocalOnly, // since if this is the only thing that's present we don't really support the // type at all: no type-specific methods will work with only this data.