From 99da5290d6d0d95d8ff6451226be53f8c739b308 Mon Sep 17 00:00:00 2001 From: Matthias Kortstiege Date: Sun, 6 Jul 2014 15:35:11 +0200 Subject: [PATCH] [cleanup] followup to f86b9d2884 --- xbmc/AppParamParser.cpp | 2 +- xbmc/ApplicationMessenger.cpp | 16 ++++++++-------- xbmc/ApplicationMessenger.h | 2 +- xbmc/addons/AddonCallbacksGUI.cpp | 2 +- xbmc/addons/AddonStatusHandler.cpp | 8 ++++---- xbmc/dialogs/GUIDialogKeyboardGeneric.cpp | 2 +- xbmc/interfaces/legacy/Dialog.cpp | 2 +- xbmc/interfaces/legacy/WindowDialogMixin.cpp | 2 +- xbmc/interfaces/legacy/WindowDialogMixin.h | 4 ++-- xbmc/video/VideoDatabase.cpp | 2 +- 10 files changed, 21 insertions(+), 21 deletions(-) diff --git a/xbmc/AppParamParser.cpp b/xbmc/AppParamParser.cpp index 21f7991d3e25e..f2edd0d8f9f63 100644 --- a/xbmc/AppParamParser.cpp +++ b/xbmc/AppParamParser.cpp @@ -155,6 +155,6 @@ void CAppParamParser::PlayPlaylist() g_playlistPlayer.SetCurrentPlaylist(0); } - ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY, (DWORD) -1}; + ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY, -1}; CApplicationMessenger::Get().SendMessage(tMsg, false); } diff --git a/xbmc/ApplicationMessenger.cpp b/xbmc/ApplicationMessenger.cpp index 82bb3059eba84..faedd2888c9ea 100644 --- a/xbmc/ApplicationMessenger.cpp +++ b/xbmc/ApplicationMessenger.cpp @@ -983,20 +983,20 @@ void CApplicationMessenger::MediaRestart(bool bWait) void CApplicationMessenger::PlayListPlayerPlay() { - ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY, (unsigned int) -1}; + ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY, -1}; SendMessage(tMsg, true); } void CApplicationMessenger::PlayListPlayerPlay(int iSong) { - ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY, (unsigned int)iSong}; + ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY, iSong}; SendMessage(tMsg, true); } bool CApplicationMessenger::PlayListPlayerPlaySongId(int songId) { bool returnState; - ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY_SONG_ID, (unsigned int)songId}; + ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_PLAY_SONG_ID, songId}; tMsg.lpVoid = (void *)&returnState; SendMessage(tMsg, true); return returnState; @@ -1052,7 +1052,7 @@ void CApplicationMessenger::PlayListPlayerInsert(int playlist, const CFileItemLi void CApplicationMessenger::PlayListPlayerRemove(int playlist, int position) { - ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_REMOVE, (unsigned int)playlist, (unsigned int)position}; + ThreadMessage tMsg = {TMSG_PLAYLISTPLAYER_REMOVE, playlist, position}; SendMessage(tMsg, true); } @@ -1171,7 +1171,7 @@ void CApplicationMessenger::RestartApp() void CApplicationMessenger::InhibitIdleShutdown(bool inhibit) { - ThreadMessage tMsg = {TMSG_INHIBITIDLESHUTDOWN, (unsigned int)inhibit}; + ThreadMessage tMsg = {TMSG_INHIBITIDLESHUTDOWN, inhibit}; SendMessage(tMsg); } @@ -1181,7 +1181,7 @@ void CApplicationMessenger::ActivateScreensaver() SendMessage(tMsg); } -void CApplicationMessenger::NetworkMessage(unsigned int dwMessage, unsigned int dwParam) +void CApplicationMessenger::NetworkMessage(int dwMessage, int dwParam) { ThreadMessage tMsg = {TMSG_NETWORKMESSAGE, dwMessage, dwParam}; SendMessage(tMsg); @@ -1234,7 +1234,7 @@ void CApplicationMessenger::Show(CGUIDialog *pDialog) void CApplicationMessenger::Close(CGUIWindow *window, bool forceClose, bool waitResult /*= true*/, int nextWindowID /*= 0*/, bool enableSound /*= true*/) { - ThreadMessage tMsg = {TMSG_GUI_WINDOW_CLOSE, (unsigned int)nextWindowID}; + ThreadMessage tMsg = {TMSG_GUI_WINDOW_CLOSE, nextWindowID}; tMsg.param2 = (forceClose ? 0x01 : 0) | (enableSound ? 0x02 : 0); tMsg.lpVoid = window; SendMessage(tMsg, waitResult); @@ -1242,7 +1242,7 @@ void CApplicationMessenger::Close(CGUIWindow *window, bool forceClose, bool wait void CApplicationMessenger::ActivateWindow(int windowID, const vector ¶ms, bool swappingWindows) { - ThreadMessage tMsg = {TMSG_GUI_ACTIVATE_WINDOW, (unsigned int)windowID, swappingWindows ? 1u : 0u}; + ThreadMessage tMsg = {TMSG_GUI_ACTIVATE_WINDOW, windowID, swappingWindows ? 1 : 0}; tMsg.params = params; SendMessage(tMsg, true); } diff --git a/xbmc/ApplicationMessenger.h b/xbmc/ApplicationMessenger.h index 379d919aabf7e..1ff19abef4aa3 100644 --- a/xbmc/ApplicationMessenger.h +++ b/xbmc/ApplicationMessenger.h @@ -227,7 +227,7 @@ class CApplicationMessenger int SetResponse(CStdString response); void ExecBuiltIn(const CStdString &command, bool wait = false); - void NetworkMessage(unsigned int dwMessage, unsigned int dwParam = 0); + void NetworkMessage(int dwMessage, int dwParam = 0); void DoModal(CGUIDialog *pDialog, int iWindowID, const CStdString ¶m = ""); void Show(CGUIDialog *pDialog); diff --git a/xbmc/addons/AddonCallbacksGUI.cpp b/xbmc/addons/AddonCallbacksGUI.cpp index 5e1d147d549bb..79d6370f7dc2d 100644 --- a/xbmc/addons/AddonCallbacksGUI.cpp +++ b/xbmc/addons/AddonCallbacksGUI.cpp @@ -1573,7 +1573,7 @@ bool CGUIAddonWindowDialog::OnMessage(CGUIMessage &message) void CGUIAddonWindowDialog::Show(bool show /* = true */) { unsigned int iCount = g_graphicsContext.exit(); - ThreadMessage tMsg = {TMSG_GUI_ADDON_DIALOG, 1, show ? 1u : 0u}; + ThreadMessage tMsg = {TMSG_GUI_ADDON_DIALOG, 1, show ? 1 : 0}; tMsg.lpVoid = this; CApplicationMessenger::Get().SendMessage(tMsg, true); g_graphicsContext.restore(iCount); diff --git a/xbmc/addons/AddonStatusHandler.cpp b/xbmc/addons/AddonStatusHandler.cpp index 6c691764351be..e2d3b90ae5a2d 100644 --- a/xbmc/addons/AddonStatusHandler.cpp +++ b/xbmc/addons/AddonStatusHandler.cpp @@ -103,7 +103,7 @@ void CAddonStatusHandler::Process() pDialog->SetLine(2, 24073); //send message and wait for user input - ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_YES_NO, (unsigned int)g_windowManager.GetActiveWindow()}; + ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_YES_NO, g_windowManager.GetActiveWindow()}; CApplicationMessenger::Get().SendMessage(tMsg, true); if (pDialog->IsConfirmed()) @@ -120,7 +120,7 @@ void CAddonStatusHandler::Process() pDialog->SetLine(1, 24074); //send message and wait for user input - ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_OK, (unsigned int)g_windowManager.GetActiveWindow()}; + ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_OK, g_windowManager.GetActiveWindow()}; CApplicationMessenger::Get().SendMessage(tMsg, true); CAddonMgr::Get().GetCallbackForType(m_addon->Type())->RequestRestart(m_addon, true); @@ -137,7 +137,7 @@ void CAddonStatusHandler::Process() pDialogYesNo->SetLine(3, m_message); //send message and wait for user input - ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_YES_NO, (unsigned int)g_windowManager.GetActiveWindow()}; + ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_YES_NO, g_windowManager.GetActiveWindow()}; CApplicationMessenger::Get().SendMessage(tMsg, true); if (!pDialogYesNo->IsConfirmed()) return; @@ -165,7 +165,7 @@ void CAddonStatusHandler::Process() pDialog->SetLine(3, m_message); //send message and wait for user input - ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_OK, (unsigned int)g_windowManager.GetActiveWindow()}; + ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_OK, g_windowManager.GetActiveWindow()}; CApplicationMessenger::Get().SendMessage(tMsg, true); } } diff --git a/xbmc/dialogs/GUIDialogKeyboardGeneric.cpp b/xbmc/dialogs/GUIDialogKeyboardGeneric.cpp index 8b28425897953..57e46ae7adbcb 100644 --- a/xbmc/dialogs/GUIDialogKeyboardGeneric.cpp +++ b/xbmc/dialogs/GUIDialogKeyboardGeneric.cpp @@ -709,7 +709,7 @@ bool CGUIDialogKeyboardGeneric::ShowAndGetInput(char_callback_t pCallback, const pKeyboard->SetHiddenInput(bHiddenInput); pKeyboard->SetText(initialString); // do this using a thread message to avoid render() conflicts - ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_KEYBOARD, (unsigned int)g_windowManager.GetActiveWindow()}; + ThreadMessage tMsg = {TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_KEYBOARD, g_windowManager.GetActiveWindow()}; CApplicationMessenger::Get().SendMessage(tMsg, true); pKeyboard->Close(); diff --git a/xbmc/interfaces/legacy/Dialog.cpp b/xbmc/interfaces/legacy/Dialog.cpp index 4793bbe84ab80..ae67d7ea8e730 100644 --- a/xbmc/interfaces/legacy/Dialog.cpp +++ b/xbmc/interfaces/legacy/Dialog.cpp @@ -39,7 +39,7 @@ namespace XBMCAddon { static void XBMCWaitForThreadMessage(int message, int param1, int param2) { - ThreadMessage tMsg = {(DWORD)message, (DWORD)param1, (DWORD)param2}; + ThreadMessage tMsg = {(DWORD)message, param1, param2}; CApplicationMessenger::Get().SendMessage(tMsg, true); } diff --git a/xbmc/interfaces/legacy/WindowDialogMixin.cpp b/xbmc/interfaces/legacy/WindowDialogMixin.cpp index 21cfa480a9c87..2cfb611695df5 100644 --- a/xbmc/interfaces/legacy/WindowDialogMixin.cpp +++ b/xbmc/interfaces/legacy/WindowDialogMixin.cpp @@ -31,7 +31,7 @@ namespace XBMCAddon void WindowDialogMixin::show() { XBMC_TRACE; - ThreadMessage tMsg = {TMSG_GUI_PYTHON_DIALOG, HACK_CUSTOM_ACTION_OPENING, 0u}; + ThreadMessage tMsg = {TMSG_GUI_PYTHON_DIALOG, HACK_CUSTOM_ACTION_OPENING, 0}; tMsg.lpVoid = w->window->get(); CApplicationMessenger::Get().SendMessage(tMsg, true); } diff --git a/xbmc/interfaces/legacy/WindowDialogMixin.h b/xbmc/interfaces/legacy/WindowDialogMixin.h index 75026021a885e..677b39d5c6b64 100644 --- a/xbmc/interfaces/legacy/WindowDialogMixin.h +++ b/xbmc/interfaces/legacy/WindowDialogMixin.h @@ -25,8 +25,8 @@ // These messages are a side effect of the way dialogs work through the // main ApplicationMessenger. At some point it would be nice to remove // the messenger and have direct (or even drive) communications. -#define HACK_CUSTOM_ACTION_CLOSING -3u -#define HACK_CUSTOM_ACTION_OPENING -4u +#define HACK_CUSTOM_ACTION_CLOSING -3 +#define HACK_CUSTOM_ACTION_OPENING -4 namespace XBMCAddon { diff --git a/xbmc/video/VideoDatabase.cpp b/xbmc/video/VideoDatabase.cpp index 8ac7e4155e4f4..1529a3295c12f 100644 --- a/xbmc/video/VideoDatabase.cpp +++ b/xbmc/video/VideoDatabase.cpp @@ -8225,7 +8225,7 @@ std::vector CVideoDatabase::CleanMediaType(const std::string &mediaType, co pDialog->SetChoice(1, 15014); //send message and wait for user input - ThreadMessage tMsg = { TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_YES_NO, (unsigned int)g_windowManager.GetActiveWindow() }; + ThreadMessage tMsg = { TMSG_DIALOG_DOMODAL, WINDOW_DIALOG_YES_NO, g_windowManager.GetActiveWindow() }; CApplicationMessenger::Get().SendMessage(tMsg, true); del = !pDialog->IsConfirmed();