summaryrefslogtreecommitdiff
path: root/phonenumberutil.cc
diff options
context:
space:
mode:
authorphilip.liard@gmail.com <philip.liard@gmail.com@ee073f10-1060-11df-b6a4-87a95322a99c>2013-10-18 09:56:13 +0000
committerphilip.liard@gmail.com <philip.liard@gmail.com@ee073f10-1060-11df-b6a4-87a95322a99c>2013-10-18 09:56:13 +0000
commit8d8b5b3b2035197795d27573d4cf566b5d9ad689 (patch)
tree3f423e7042eb9e1e94aef2081bfbc4bd8c48f4dc /phonenumberutil.cc
parent18404d8ed386420aabe8027d3c1da1d06a03f696 (diff)
downloadphonenumbers-8d8b5b3b2035197795d27573d4cf566b5d9ad689.tar.gz
CPP: Remove uses of std::{cerr,endl} in production code.
They generated static initializers on Clang/Mac. This also adds the previously missing <algorithm> include in unicodetext.cc causing a compilation error on VS2013. This is a squash of (very slightly modified) patches contributed by thakis@ and yosin@. R=roes@google.com Review URL: https://codereview.appspot.com/14930044 git-svn-id: http://libphonenumber.googlecode.com/svn/trunk/cpp/src/phonenumbers@621 ee073f10-1060-11df-b6a4-87a95322a99c
Diffstat (limited to 'phonenumberutil.cc')
-rw-r--r--phonenumberutil.cc11
1 files changed, 2 insertions, 9 deletions
diff --git a/phonenumberutil.cc b/phonenumberutil.cc
index d966a35..fcca95f 100644
--- a/phonenumberutil.cc
+++ b/phonenumberutil.cc
@@ -17,14 +17,11 @@
#include "phonenumbers/phonenumberutil.h"
-#include <string.h>
#include <algorithm>
#include <cctype>
-#include <fstream>
-#include <iostream>
+#include <cstring>
#include <iterator>
#include <map>
-#include <sstream>
#include <utility>
#include <vector>
@@ -55,12 +52,8 @@
namespace i18n {
namespace phonenumbers {
-using std::cerr;
-using std::endl;
-using std::ifstream;
using std::make_pair;
using std::sort;
-using std::stringstream;
using google::protobuf::RepeatedPtrField;
@@ -118,7 +111,7 @@ const char kSingleExtnSymbolsForMatching[] =
bool LoadCompiledInMetadata(PhoneMetadataCollection* metadata) {
if (!metadata->ParseFromArray(metadata_get(), metadata_size())) {
- cerr << "Could not parse binary data." << endl;
+ LOG(ERROR) << "Could not parse binary data.";
return false;
}
return true;