Don't compare signed and unsigned variables if possible (insert a cast in one
place where it wasn't).
Put WXUNUSED() around the unused parameters.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69283
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#if wxUSE_HOTKEY && wxOSX_USE_COCOA_OR_CARBON
#if wxUSE_HOTKEY && wxOSX_USE_COCOA_OR_CARBON
-OSStatus wxHotKeyHandler(EventHandlerCallRef nextHandler,EventRef event, void *userData)
+OSStatus
+wxHotKeyHandler(EventHandlerCallRef WXUNUSED(nextHandler),
+ EventRef event,
+ void* WXUNUSED(userData))
{
EventHotKeyID hotKeyId;
GetEventParameter( event, kEventParamDirectObject, typeEventHotKeyID, NULL, sizeof(hotKeyId), NULL, &hotKeyId);
{
EventHotKeyID hotKeyId;
GetEventParameter( event, kEventParamDirectObject, typeEventHotKeyID, NULL, sizeof(hotKeyId), NULL, &hotKeyId);
- for ( int i = 0; i < s_hotkeys.size(); ++i )
+ for ( unsigned i = 0; i < s_hotkeys.size(); ++i )
- if ( s_hotkeys[i].keyId == hotKeyId.id )
+ if ( s_hotkeys[i].keyId == static_cast<int>(hotKeyId.id) )
{
unsigned char charCode ;
UInt32 keyCode ;
{
unsigned char charCode ;
UInt32 keyCode ;
bool wxWindowMac::RegisterHotKey(int hotkeyId, int modifiers, int keycode)
{
bool wxWindowMac::RegisterHotKey(int hotkeyId, int modifiers, int keycode)
{
- for ( int i = 0; i < s_hotkeys.size(); ++i )
+ for ( unsigned i = 0; i < s_hotkeys.size(); ++i )
{
if ( s_hotkeys[i].keyId == hotkeyId )
{
{
if ( s_hotkeys[i].keyId == hotkeyId )
{
bool wxWindowMac::UnregisterHotKey(int hotkeyId)
{
bool wxWindowMac::UnregisterHotKey(int hotkeyId)
{
- for ( int i = s_hotkeys.size()-1; i>=0; -- i )
+ for ( unsigned i = s_hotkeys.size()-1; i>=0; -- i )
{
if ( s_hotkeys[i].keyId == hotkeyId )
{
{
if ( s_hotkeys[i].keyId == hotkeyId )
{