Skip to content

Commit

Permalink
Remove last non-third_party typeofs on Mac.
Browse files Browse the repository at this point in the history
BUG=427584

Review URL: https://codereview.chromium.org/684273002

Cr-Commit-Position: refs/heads/master@{#301948}
  • Loading branch information
nico authored and Commit bot committed Oct 29, 2014
1 parent 868f433 commit e6e95d9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
10 changes: 1 addition & 9 deletions ipc/ipc_message_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {

Expand Down
4 changes: 2 additions & 2 deletions ppapi/tests/test_broker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ 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); \
eintr_wrapper_result; \
})

#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) { \
Expand Down
2 changes: 1 addition & 1 deletion ui/message_center/cocoa/tray_controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down

0 comments on commit e6e95d9

Please sign in to comment.