diff --git a/cpp/src/phonenumbers/asyoutypeformatter.cc b/cpp/src/phonenumbers/asyoutypeformatter.cc index 07317aa58..6590296a7 100644 --- a/cpp/src/phonenumbers/asyoutypeformatter.cc +++ b/cpp/src/phonenumbers/asyoutypeformatter.cc @@ -22,7 +22,6 @@ #include #include "phonenumbers/base/logging.h" -#include "phonenumbers/base/memory/scoped_ptr.h" #include "phonenumbers/phonemetadata.pb.h" #include "phonenumbers/phonenumberutil.h" #include "phonenumbers/regexp_cache.h" diff --git a/cpp/src/phonenumbers/asyoutypeformatter.h b/cpp/src/phonenumbers/asyoutypeformatter.h index 8e865f847..ab49de3bc 100644 --- a/cpp/src/phonenumbers/asyoutypeformatter.h +++ b/cpp/src/phonenumbers/asyoutypeformatter.h @@ -47,7 +47,6 @@ namespace i18n { namespace phonenumbers { using std::list; -using std::string; class PhoneNumberUtil; diff --git a/cpp/src/phonenumbers/default_logger.cc b/cpp/src/phonenumbers/default_logger.cc index fd6802410..f144f4748 100644 --- a/cpp/src/phonenumbers/default_logger.cc +++ b/cpp/src/phonenumbers/default_logger.cc @@ -21,8 +21,6 @@ namespace i18n { namespace phonenumbers { -using std::string; - void StdoutLogger::WriteMessage(const string& msg) { std::cout << " " << msg; } diff --git a/cpp/src/phonenumbers/default_logger.h b/cpp/src/phonenumbers/default_logger.h index 25754d74d..f05e0c47d 100644 --- a/cpp/src/phonenumbers/default_logger.h +++ b/cpp/src/phonenumbers/default_logger.h @@ -26,7 +26,6 @@ namespace i18n { namespace phonenumbers { using i18n::phonenumbers::Logger; -using std::string; using std::stringstream; // Class template used to inline the right implementation for the T -> string diff --git a/cpp/src/phonenumbers/normalize_utf8.h b/cpp/src/phonenumbers/normalize_utf8.h index 36ddc38dc..b25e33e47 100644 --- a/cpp/src/phonenumbers/normalize_utf8.h +++ b/cpp/src/phonenumbers/normalize_utf8.h @@ -19,8 +19,6 @@ namespace i18n { namespace phonenumbers { -using std::string; - struct NormalizeUTF8 { // Put a UTF-8 string in ASCII digits: All decimal digits (Nd) replaced by // their ASCII counterparts; all other characters are copied from input to diff --git a/cpp/src/phonenumbers/phonenumberutil.cc b/cpp/src/phonenumbers/phonenumberutil.cc index 0511b215c..a87b75ef0 100644 --- a/cpp/src/phonenumbers/phonenumberutil.cc +++ b/cpp/src/phonenumbers/phonenumberutil.cc @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -53,7 +52,6 @@ namespace i18n { namespace phonenumbers { using google::protobuf::RepeatedField; -using google::protobuf::RepeatedPtrField; using std::find; // static constants diff --git a/cpp/src/phonenumbers/regex_based_matcher.cc b/cpp/src/phonenumbers/regex_based_matcher.cc index a1907378d..e9e1bcece 100644 --- a/cpp/src/phonenumbers/regex_based_matcher.cc +++ b/cpp/src/phonenumbers/regex_based_matcher.cc @@ -28,8 +28,6 @@ namespace i18n { namespace phonenumbers { -using std::string; - // Same implementations of AbstractRegExpFactory and RegExpCache in // PhoneNumberUtil (copy from phonenumberutil.cc). RegexBasedMatcher::RegexBasedMatcher() diff --git a/cpp/src/phonenumbers/regexp_adapter_re2.cc b/cpp/src/phonenumbers/regexp_adapter_re2.cc index 655f219f2..3fde29063 100644 --- a/cpp/src/phonenumbers/regexp_adapter_re2.cc +++ b/cpp/src/phonenumbers/regexp_adapter_re2.cc @@ -30,8 +30,6 @@ namespace i18n { namespace phonenumbers { -using re2::StringPiece; - // Implementation of RegExpInput abstract class. class RE2RegExpInput : public RegExpInput { public: diff --git a/cpp/src/phonenumbers/utf/stringprintf.h b/cpp/src/phonenumbers/utf/stringprintf.h deleted file mode 100644 index e83d2b45c..000000000 --- a/cpp/src/phonenumbers/utf/stringprintf.h +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright 2010 Google Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#ifndef STRINGS_STRINGPRINTF_H_ -#define STRINGS_STRINGPRINTF_H_ - -//#include "third_party/chromium/src/base/string_util.h" -#include "phonenumbers/base/string_util.h" - -#endif // STRINGS_STRINGPRINTF_H_ diff --git a/cpp/src/phonenumbers/utf/unicodetext.cc b/cpp/src/phonenumbers/utf/unicodetext.cc index 660f3b7e5..11f68f762 100644 --- a/cpp/src/phonenumbers/utf/unicodetext.cc +++ b/cpp/src/phonenumbers/utf/unicodetext.cc @@ -21,7 +21,6 @@ #include "phonenumbers/utf/unicodetext.h" #include "phonenumbers/utf/stringpiece.h" -//#include "utf/stringprintf.h" #include "phonenumbers/utf/utf.h" #include "phonenumbers/utf/unilib.h" diff --git a/cpp/test/phonenumbers/geocoding/geocoding_data_test.cc b/cpp/test/phonenumbers/geocoding/geocoding_data_test.cc index 53a02df84..a21eac6cb 100644 --- a/cpp/test/phonenumbers/geocoding/geocoding_data_test.cc +++ b/cpp/test/phonenumbers/geocoding/geocoding_data_test.cc @@ -23,7 +23,6 @@ #include "phonenumbers/base/basictypes.h" #include "phonenumbers/geocoding/geocoding_data.h" #include "phonenumbers/geocoding/geocoding_test_data.h" -#include "phonenumbers/stringutil.h" namespace i18n { namespace phonenumbers { diff --git a/cpp/test/phonenumbers/logger_test.cc b/cpp/test/phonenumbers/logger_test.cc index dcd94e507..471d789aa 100644 --- a/cpp/test/phonenumbers/logger_test.cc +++ b/cpp/test/phonenumbers/logger_test.cc @@ -25,8 +25,6 @@ namespace i18n { namespace phonenumbers { -using std::string; - // String logger implementation used for testing. Messages are output to a // string for convenience. class StringLogger : public Logger { diff --git a/cpp/test/phonenumbers/regexp_adapter_test.cc b/cpp/test/phonenumbers/regexp_adapter_test.cc index 80abfb59a..a75cc69f1 100644 --- a/cpp/test/phonenumbers/regexp_adapter_test.cc +++ b/cpp/test/phonenumbers/regexp_adapter_test.cc @@ -35,7 +35,6 @@ namespace i18n { namespace phonenumbers { -using std::string; using std::vector; // Structure that contains the attributes used to test an implementation of the diff --git a/javascript/i18n/phonenumbers/demo-compiled.js b/javascript/i18n/phonenumbers/demo-compiled.js index 640a1c876..1cc12d5bc 100644 --- a/javascript/i18n/phonenumbers/demo-compiled.js +++ b/javascript/i18n/phonenumbers/demo-compiled.js @@ -1,14 +1,14 @@ (function(){for(var aa="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(c.get||c.set)throw new TypeError("ES3 does not support getters and setters.");a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},k="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,l=["String","prototype","repeat"],ba=0;baa||1342177279>>=1)b+=b;return c};fa!=ea&&null!=fa&&aa(k,da,{configurable:!0,writable:!0,value:fa}); function ga(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null"; -else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function n(a){return"string"==typeof a}function p(a,b){function c(){}c.prototype=b.prototype;a.ca=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.ma=function(a,c,f){for(var d=Array(arguments.length-2),e=2;ec?Math.max(0,a.length+c):c;if(n(a))return n(b)&&1==b.length?a.indexOf(b,c):-1;for(;cb?1:ac?Math.max(0,a.length+c):c;if(n(a))return n(b)&&1==b.length?a.indexOf(b,c):-1;for(;cb?1:aa.length?!1:N(eb,a)}function nb(a){return N(cb,a)?O(a,Wa):O(a,L)}function ob(a){var b=nb(a.toString());C(a);a.a(b)}function O(a,b){for(var c=new B,d,e=a.length,f=0;f=e)a=c;else if(d=d.substring(0,e),d=O(d,L),d.length)if(g=g.clone(),La(g,4),d=[g],g=x(b,1),c=Q(b),g in J){a=T(a,g,U(g));if(e=wb(d,c))d=e.clone(),e=x(e,4),0=e)a=c;else if(d=d.substring(0,e),d=O(d,L),d.length)if(g=g.clone(),La(g,4),d=[g],g=x(b,1),c=R(b),g in J){a=T(a,g,U(g));if(e=wb(d,c))d=e.clone(),e=x(e,4),0e?2:c[c.length-1]e?2:c[c.length-1]=f&&f<=e;++f)if(d=parseInt(c.substring(0,f),10),d in J)return b.a(c.substring(f)),d;return 0} function Gb(a,b,c,d,e){if(!a.length)return 0;a=new B(a);var f;b&&(f=u(b,11));null==f&&(f="NonMatch");var g=a.toString();if(g.length)if(M.test(g))g=g.replace(M,""),C(a),a.a(nb(g)),f=1;else{g=new RegExp(f);ob(a);f=a.toString();if(f.search(g))f=!1;else{var g=f.match(g)[0].length,h=f.substring(g).match(Za);h&&null!=h[1]&&0=a.b.length)throw Error("Phone number too short after IDD");if(c=Fb(a, c))return v(e,1,c),c;throw Error("Invalid country calling code");}if(b&&(f=x(b,10),g=""+f,h=a.toString(),!h.lastIndexOf(g,0))){var m=new B(h.substring(g.length)),g=u(b,1),h=new RegExp(x(g,2));Hb(m,b,null);b=m.toString();if(!N(h,a.toString())&&N(h,b)||3==Db(a.toString(),g))return c.a(b),d&&v(e,6,10),v(e,1,f),f}v(e,1,0);return 0} function Hb(a,b,c){var d=a.toString(),e=d.length,f=u(b,15);if(e&&null!=f&&f.length){var g=new RegExp("^(?:"+f+")");if(e=g.exec(d)){var f=new RegExp(x(u(b,1),2)),h=N(f,d),m=e.length-1;b=u(b,16);if(null!=b&&b.length&&null!=e[m]&&e[m].length){if(d=d.replace(g,b),!h||N(f,d))c&&0g.b.length)throw Error("The string supplied is too short to be a phone number");b&&(a=new B,c=new B(g.toString()),Hb(c,b,a),2!=Db(c.toString(),u(b,1))&&(g=c,d&&0a)throw Error("The string supplied is too short to be a phone number");if(17