X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3281bf677914de79543d590b89cd275573c2c6df..344ff08345eba81fcdcc55dd711ce6bc4bb747a3:/src/mac/carbon/window.cpp diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 3cbaafa3c4..dbf267960f 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -11,31 +11,34 @@ #include "wx/wxprec.h" -#include "wx/menu.h" #include "wx/window.h" -#include "wx/dc.h" -#include "wx/dcclient.h" -#include "wx/utils.h" -#include "wx/app.h" -#include "wx/panel.h" + +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/app.h" + #include "wx/utils.h" + #include "wx/panel.h" + #include "wx/frame.h" + #include "wx/dc.h" + #include "wx/dcclient.h" + #include "wx/button.h" + #include "wx/menu.h" + #include "wx/dialog.h" + #include "wx/settings.h" + #include "wx/msgdlg.h" +#endif + #include "wx/layout.h" -#include "wx/dialog.h" #include "wx/scrolbar.h" #include "wx/statbox.h" -#include "wx/button.h" -#include "wx/settings.h" -#include "wx/msgdlg.h" -#include "wx/frame.h" #include "wx/tooltip.h" #include "wx/statusbr.h" #include "wx/menuitem.h" #include "wx/spinctrl.h" -#include "wx/log.h" #include "wx/geometry.h" #include "wx/textctrl.h" #include "wx/toolbar.h" -#include "wx/dc.h" #if wxUSE_CARET #include "wx/caret.h" @@ -65,8 +68,6 @@ #include -extern wxList wxPendingDelete; - #ifdef __WXUNIVERSAL__ IMPLEMENT_ABSTRACT_CLASS(wxWindowMac, wxWindowBase) #else @@ -507,14 +508,14 @@ pascal OSStatus wxMacUnicodeTextEventHandler( EventHandlerCallRef handler , Even numChars = dataSize / sizeof( UniChar) + 1; charBuf = buf ; - if ( numChars * 2 > sizeof(buf) ) + if ( (size_t) numChars * 2 > sizeof(buf) ) charBuf = new UniChar[ numChars ] ; else charBuf = buf ; uniChars = new wchar_t[ numChars ] ; GetEventParameter( event, kEventParamTextInputSendText, typeUnicodeText, NULL, dataSize , NULL , charBuf ) ; - charBuf[ numChars - 1 ] = 0; + charBuf[ numChars - 1 ] = 0; #if SIZEOF_WCHAR_T == 2 uniChars = (wchar_t*) charBuf ; memcpy( uniChars , charBuf , numChars * 2 ) ;