diff options
author | philip.liard@gmail.com <philip.liard@gmail.com@ee073f10-1060-11df-b6a4-87a95322a99c> | 2012-05-22 11:09:54 +0000 |
---|---|---|
committer | philip.liard@gmail.com <philip.liard@gmail.com@ee073f10-1060-11df-b6a4-87a95322a99c> | 2012-05-22 11:09:54 +0000 |
commit | a6eef04c15f45d5916ee3429d24665c49148b99b (patch) | |
tree | f250aeaca3fb3e1533b4c1eef99abb67eafbe29f | |
parent | 458af0840256ed1978aa3fb4040fb5e91d9076c5 (diff) | |
download | phonenumbers-a6eef04c15f45d5916ee3429d24665c49148b99b.tar.gz |
CPP: Fix compilation error with -DUSE_GOOGLE_BASE
This removes the Chromium-specific (outdated) Logger interface from
default_logger.h.
The return type of set_logger_impl() differed from the one in logger.h (changed
in r430) which produced a compilation error in phonenumberutil.cc when
set_logger_impl() is used as a right value.
Logger, defined in logger.h is now used in all cases.
git-svn-id: http://libphonenumber.googlecode.com/svn/trunk/cpp/src/phonenumbers@456 ee073f10-1060-11df-b6a4-87a95322a99c
-rw-r--r-- | default_logger.h | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/default_logger.h b/default_logger.h index 1cde2a5..d6ba050 100644 --- a/default_logger.h +++ b/default_logger.h @@ -17,31 +17,17 @@ #ifndef I18N_PHONENUMBERS_DEFAULT_LOGGER_H_ #define I18N_PHONENUMBERS_DEFAULT_LOGGER_H_ +#include "phonenumbers/logger.h" + #ifdef USE_GOOGLE_BASE 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 -// implementation of this logger. -class StdoutLogger : public Logger { - public: - virtual ~StdoutLogger() {} - - virtual void WriteLevel() {} - virtual void WriteMessage(const string& /* msg */) {} -}; +// phonenumberutil will actually never be used. +typedef NullLogger StdoutLogger; } // namespace phonenumbers } // namespace i18n @@ -51,8 +37,6 @@ class StdoutLogger : public Logger { #include <sstream> #include <string> -#include "phonenumbers/logger.h" - using std::string; using std::stringstream; |