Commits

Anonymous committed 5ba90a5

CPP: Fix logger and asyoutypeformatter unit test to let the latest release build in Chromium.

Patch contributed by georgey@chromium.org.

Review URL: http://codereview.appspot.com/5440052

Comments (0)

Files changed (2)

cpp/src/phonenumbers/default_logger.h

 namespace i18n {
 namespace phonenumbers {
 
+// There is no Logger in the new base implementation - provide a NOP one.
+class Logger {
+ public:
+  Logger() {}
+  virtual ~Logger() {}
+
+  static void set_logger_impl(Logger*) {}
+};
+
 // If Google base/ is used, LOG() and VLOG() from base/logging.h are used
 // therefore the default logger implementation (StdoutLogger) instantiated in
 // phonenumberutil will actually never be used. Thus provide a dummy

cpp/test/phonenumbers/asyoutypeformatter_test.cc

   }
 
   const PhoneMetadata* GetCurrentMetadata() const {
-    return CHECK_NOTNULL(formatter_.get())->current_metadata_;
+    return formatter_.get()->current_metadata_;
   }
 
   int ConvertUnicodeStringPosition(const UnicodeString& s, int pos) const {