From e6e95d9e01542a10db9611bb96025913df5a4356 Mon Sep 17 00:00:00 2001 From: thakis Date: Wed, 29 Oct 2014 15:04:47 -0700 Subject: [PATCH] Remove last non-third_party typeofs on Mac. BUG=427584 Review URL: https://codereview.chromium.org/684273002 Cr-Commit-Position: refs/heads/master@{#301948} --- ipc/ipc_message_macros.h | 10 +--------- ppapi/tests/test_broker.cc | 4 ++-- ui/message_center/cocoa/tray_controller.mm | 2 +- 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h index 96cc20ba85ff1a..20c83350733453 100644 --- a/ipc/ipc_message_macros.h +++ b/ipc/ipc_message_macros.h @@ -897,18 +897,10 @@ const IPC::Message& ipc_message__ = msg; \ switch (ipc_message__.type()) { -// gcc gives the following error now when using decltype so type typeof there: -// error: identifier 'decltype' will become a keyword in C++0x [-Werror=c++0x-compat] -#if defined(OS_WIN) -#define IPC_DECLTYPE decltype -#else -#define IPC_DECLTYPE typeof -#endif - #define IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(class_name, msg, param) \ { \ typedef class_name _IpcMessageHandlerClass ALLOW_UNUSED_TYPE; \ - IPC_DECLTYPE(param) param__ = param; \ + decltype(param) param__ = param; \ const IPC::Message& ipc_message__ = msg; \ switch (ipc_message__.type()) { diff --git a/ppapi/tests/test_broker.cc b/ppapi/tests/test_broker.cc index db2fa3ffbb39e2..54b4671f46728c 100644 --- a/ppapi/tests/test_broker.cc +++ b/ppapi/tests/test_broker.cc @@ -60,7 +60,7 @@ PlatformFile IntToPlatformFile(int32_t handle) { #if defined(OS_POSIX) #define HANDLE_EINTR(x) ({ \ - typeof(x) eintr_wrapper_result; \ + decltype(x) eintr_wrapper_result; \ do { \ eintr_wrapper_result = (x); \ } while (eintr_wrapper_result == -1 && errno == EINTR); \ @@ -68,7 +68,7 @@ PlatformFile IntToPlatformFile(int32_t handle) { }) #define IGNORE_EINTR(x) ({ \ - typeof(x) eintr_wrapper_result; \ + decltype(x) eintr_wrapper_result; \ do { \ eintr_wrapper_result = (x); \ if (eintr_wrapper_result == -1 && errno == EINTR) { \ diff --git a/ui/message_center/cocoa/tray_controller.mm b/ui/message_center/cocoa/tray_controller.mm index 672525f29dc5da..ddbdcc77cdc63b 100644 --- a/ui/message_center/cocoa/tray_controller.mm +++ b/ui/message_center/cocoa/tray_controller.mm @@ -52,7 +52,7 @@ - (id)initWithMessageCenterTray:(message_center::MessageCenterTray*)tray { // The global event monitor will close the tray in response to events // delivered to other applications, and -windowDidResignKey: will catch // events within the application. - __block typeof(self) weakSelf = self; + __block MCTrayController* weakSelf = self; clickEventMonitor_ = [NSEvent addGlobalMonitorForEventsMatchingMask:NSLeftMouseDownMask | NSRightMouseDownMask |