From a590b41c9ae8a41391a0556ae7d2aedbae7d3c38 Mon Sep 17 00:00:00 2001 From: "sergeyu@chromium.org" Date: Mon, 17 Jun 2013 20:02:21 +0000 Subject: [PATCH] Use intptr_t to represent window IDs on all platforms. Previously void* was used on windows which makes it harder to work with the IDs in cross-platform code. R=alexeypa@chromium.org Review URL: https://webrtc-codereview.appspot.com/1672004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4237 4adac7df-926f-26a2-2b94-8c16560cd09d --- webrtc/modules/desktop_capture/window_capturer.h | 6 +----- webrtc/modules/desktop_capture/window_capturer_win.cc | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/webrtc/modules/desktop_capture/window_capturer.h b/webrtc/modules/desktop_capture/window_capturer.h index 65b27eda07..8cc57c14d5 100644 --- a/webrtc/modules/desktop_capture/window_capturer.h +++ b/webrtc/modules/desktop_capture/window_capturer.h @@ -22,11 +22,7 @@ namespace webrtc { class WindowCapturer : public DesktopCapturer { public: -#if defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) - typedef unsigned int WindowId; -#elif defined(WEBRTC_WIN) - typedef void* WindowId; -#endif + typedef intptr_t WindowId; struct Window { WindowId id; diff --git a/webrtc/modules/desktop_capture/window_capturer_win.cc b/webrtc/modules/desktop_capture/window_capturer_win.cc index f9316c14d1..97d1d27cbc 100644 --- a/webrtc/modules/desktop_capture/window_capturer_win.cc +++ b/webrtc/modules/desktop_capture/window_capturer_win.cc @@ -64,7 +64,7 @@ BOOL CALLBACK WindowsEnumerationHandler(HWND hwnd, LPARAM param) { return TRUE; WindowCapturer::Window window; - window.id = hwnd; + window.id = reinterpret_cast(hwnd); const size_t kTitleLength = 500; WCHAR window_title[kTitleLength];