Skip to content

Commit acdd946

Browse files
Rename NonGeographicalRegion to NonGeographicalEntity
I renamed the NonGeographicalRegion variables and methodes to NonGeographicalEntity because we want to keep the naming the same so its easier to read. This CL is for the C++ version.
1 parent 825a9e1 commit acdd946

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

cpp/src/phonenumbers/asyoutypeformatter.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ bool AsYouTypeFormatter::AttemptToExtractCountryCode() {
688688
phone_util_.GetRegionCodeForCountryCode(country_code, &new_region_code);
689689
if (PhoneNumberUtil::kRegionCodeForNonGeoEntity == new_region_code) {
690690
current_metadata_ =
691-
phone_util_.GetMetadataForNonGeographicalRegion(country_code);
691+
phone_util_.GetMetadataForNonGeographicalEntity(country_code);
692692
} else if (new_region_code != default_country_) {
693693
current_metadata_ = GetMetadataForRegion(new_region_code);
694694
}

cpp/src/phonenumbers/phonenumberutil.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -971,7 +971,7 @@ void PhoneNumberUtil::GetSupportedTypesForNonGeoEntity(
971971
std::set<PhoneNumberType>* types) const {
972972
DCHECK(types);
973973
const PhoneMetadata* metadata =
974-
GetMetadataForNonGeographicalRegion(country_calling_code);
974+
GetMetadataForNonGeographicalEntity(country_calling_code);
975975
if (metadata == NULL) {
976976
LOG(WARNING) << "Unknown country calling code for a non-geographical "
977977
<< "entity provided: "
@@ -1102,7 +1102,7 @@ const PhoneMetadata* PhoneNumberUtil::GetMetadataForRegion(
11021102
return NULL;
11031103
}
11041104

1105-
const PhoneMetadata* PhoneNumberUtil::GetMetadataForNonGeographicalRegion(
1105+
const PhoneMetadata* PhoneNumberUtil::GetMetadataForNonGeographicalEntity(
11061106
int country_calling_code) const {
11071107
absl::node_hash_map<int, PhoneMetadata>::const_iterator it =
11081108
country_code_to_non_geographical_metadata_map_->find(
@@ -1253,7 +1253,7 @@ void PhoneNumberUtil::FormatNationalNumberWithCarrierCode(
12531253
const PhoneMetadata* PhoneNumberUtil::GetMetadataForRegionOrCallingCode(
12541254
int country_calling_code, const std::string& region_code) const {
12551255
return kRegionCodeForNonGeoEntity == region_code
1256-
? GetMetadataForNonGeographicalRegion(country_calling_code)
1256+
? GetMetadataForNonGeographicalEntity(country_calling_code)
12571257
: GetMetadataForRegion(region_code);
12581258
}
12591259

@@ -2057,7 +2057,7 @@ bool PhoneNumberUtil::GetExampleNumberForType(
20572057
it != global_network_calling_codes.end(); ++it) {
20582058
int country_calling_code = *it;
20592059
const PhoneMetadata* metadata =
2060-
GetMetadataForNonGeographicalRegion(country_calling_code);
2060+
GetMetadataForNonGeographicalEntity(country_calling_code);
20612061
const PhoneNumberDesc* desc = GetNumberDescByType(*metadata, type);
20622062
if (desc->has_example_number()) {
20632063
ErrorType success = Parse(StrCat(kPlusSign,
@@ -2080,7 +2080,7 @@ bool PhoneNumberUtil::GetExampleNumberForNonGeoEntity(
20802080
int country_calling_code, PhoneNumber* number) const {
20812081
DCHECK(number);
20822082
const PhoneMetadata* metadata =
2083-
GetMetadataForNonGeographicalRegion(country_calling_code);
2083+
GetMetadataForNonGeographicalEntity(country_calling_code);
20842084
if (metadata) {
20852085
// For geographical entities, fixed-line data is always present. However,
20862086
// for non-geographical entities, this is not the case, so we have to go

cpp/src/phonenumbers/phonenumberutil.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,9 @@ class PhoneNumberUtil : public Singleton<PhoneNumberUtil> {
859859
const i18n::phonenumbers::PhoneMetadata* GetMetadataForNonGeographicalRegion(
860860
int country_calling_code) const;
861861

862+
const i18n::phonenumbers::PhoneMetadata* GetMetadataForNonGeographicalEntity(
863+
int country_calling_code) const;
864+
862865
const i18n::phonenumbers::PhoneMetadata* GetMetadataForRegionOrCallingCode(
863866
int country_calling_code,
864867
const std::string& region_code) const;

0 commit comments

Comments
 (0)