From 3822729b80379879b868942aabd8ad741a5c4961 Mon Sep 17 00:00:00 2001 From: "torne@chromium.org" Date: Mon, 30 Jan 2012 19:41:54 +0000 Subject: Make NOTIMPLEMENTED_POLICY=0 actually work. Various places in the code use NOTIMPLEMENTED() with << "message" like the other logging macros; this doesn't work when NOTIMPLEMENTED expands to a semicolon. Expand it to EAT_STREAM_PARAMETERS instead so any parameters are simply compiled away in this case. Review URL: http://codereview.chromium.org/9244006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119711 0039d316-1c4b-4281-b951-d872f2087c98 --- base/logging.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'base') diff --git a/base/logging.h b/base/logging.h index e9faca3..cac520a 100644 --- a/base/logging.h +++ b/base/logging.h @@ -963,7 +963,7 @@ inline std::ostream& operator<<(std::ostream& out, const std::wstring& wstr) { #endif #if NOTIMPLEMENTED_POLICY == 0 -#define NOTIMPLEMENTED() ; +#define NOTIMPLEMENTED() EAT_STREAM_PARAMETERS #elif NOTIMPLEMENTED_POLICY == 1 // TODO, figure out how to generate a warning #define NOTIMPLEMENTED() COMPILE_ASSERT(false, NOT_IMPLEMENTED) -- cgit v1.1