Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / libaddressinput / src / cpp / src / address_data.cc
index a3549ed..40d3ee7 100644 (file)
@@ -41,6 +41,7 @@ std::string AddressData::*kStringField[] = {
   &AddressData::sorting_code,
   &AddressData::postal_code,
   NULL,
+  &AddressData::organization,
   &AddressData::recipient
 };
 
@@ -53,6 +54,7 @@ const std::vector<std::string> AddressData::*kVectorStringField[] = {
   NULL,
   NULL,
   &AddressData::address_line,
+  NULL,
   NULL
 };
 
@@ -76,9 +78,9 @@ bool AddressData::IsFieldEmpty(AddressField field) const {
     return IsStringEmpty(value);
   } else {
     const std::vector<std::string>& value = GetRepeatedFieldValue(field);
-    return std::find_if(value.begin(), value.end(),
-                        std::not1(std::ptr_fun(&IsStringEmpty))) ==
-           value.end();
+    return std::find_if(value.begin(),
+                        value.end(),
+                        std::not1(std::ptr_fun(&IsStringEmpty))) == value.end();
   }
 }
 
@@ -104,16 +106,16 @@ const std::vector<std::string>& AddressData::GetRepeatedFieldValue(
 }
 
 bool AddressData::operator==(const AddressData& other) const {
-  return
-      region_code == other.region_code &&
-      address_line == other.address_line &&
-      administrative_area == other.administrative_area &&
-      locality == other.locality &&
-      dependent_locality == other.dependent_locality &&
-      postal_code == other.postal_code &&
-      sorting_code == other.sorting_code &&
-      language_code == other.language_code &&
-      recipient == other.recipient;
+  return region_code == other.region_code &&
+         address_line == other.address_line &&
+         administrative_area == other.administrative_area &&
+         locality == other.locality &&
+         dependent_locality == other.dependent_locality &&
+         postal_code == other.postal_code &&
+         sorting_code == other.sorting_code &&
+         language_code == other.language_code &&
+         organization == other.organization &&
+         recipient == other.recipient;
 }
 
 // static
@@ -144,6 +146,7 @@ std::ostream& operator<<(std::ostream& o,
   }
 
   o << "language_code: \"" << address.language_code << "\"\n"
+    "organization: \"" << address.organization << "\"\n"
     "recipient: \"" << address.recipient << "\"\n";
 
   return o;