X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/403750325d372829ea8162462cc1cd8a92368ac4..63e1921d0be4956ab729735189ccf637773a7e27:/src/msw/ole/dataobj.cpp?ds=sidebyside diff --git a/src/msw/ole/dataobj.cpp b/src/msw/ole/dataobj.cpp index 2f683cb5e8..2c2c44603f 100644 --- a/src/msw/ole/dataobj.cpp +++ b/src/msw/ole/dataobj.cpp @@ -28,7 +28,6 @@ #include "wx/intl.h" #include "wx/log.h" #include "wx/utils.h" - #include "wx/vector.h" #include "wx/wxcrtvararg.h" #endif @@ -37,6 +36,7 @@ #if wxUSE_OLE && defined(__WIN32__) && !defined(__GNUWIN32_OLD__) #include "wx/scopedarray.h" +#include "wx/vector.h" #include "wx/msw/private.h" // includes #ifdef __WXWINCE__ @@ -930,7 +930,7 @@ void wxDataObject::SetAutoDelete() ((wxIDataObject *)m_pIDataObject)->SetDeleteFlag(); m_pIDataObject->Release(); - // so that the dtor doesnt' crash + // so that the dtor doesn't crash m_pIDataObject = NULL; } @@ -1306,7 +1306,7 @@ size_t wxFileDataObject::GetDataSize() const if ( wxGetOsVersion() == wxOS_WINDOWS_9X ) { // Win9x always uses ANSI file names and MSLU doesn't help with this - sizeOfChar = sizeof(char); + sizeOfChar = 1; } else { @@ -1316,7 +1316,7 @@ size_t wxFileDataObject::GetDataSize() const static const size_t sizeOfChar = sizeof(wxChar); #endif // wxUSE_UNICODE_MSLU/!wxUSE_UNICODE_MSLU - // inital size of DROPFILES struct + null byte + // initial size of DROPFILES struct + null byte size_t sz = sizeof(DROPFILES) + sizeOfChar; const size_t count = m_filenames.size(); @@ -1325,7 +1325,7 @@ size_t wxFileDataObject::GetDataSize() const // add filename length plus null byte size_t len; #if wxUSE_UNICODE_MSLU - if ( sizeOfChar == sizeof(char) ) + if ( sizeOfChar == 1 ) len = strlen(m_filenames[i].mb_str(*wxConvFileName)); else #endif // wxUSE_UNICODE_MSLU @@ -1362,7 +1362,7 @@ bool wxFileDataObject::GetDataHere(void *WXUNUSED_IN_WINCE(pData)) const pDrop->fWide = wxUSE_UNICODE; #endif - const size_t sizeOfChar = pDrop->fWide ? sizeof(wchar_t) : sizeof(char); + const size_t sizeOfChar = pDrop->fWide ? sizeof(wchar_t) : 1; // set start of filenames list (null separated) BYTE *pbuf = (BYTE *)(pDrop + 1); @@ -1373,7 +1373,7 @@ bool wxFileDataObject::GetDataHere(void *WXUNUSED_IN_WINCE(pData)) const // copy filename to pbuf and add null terminator size_t len; #if wxUSE_UNICODE_MSLU - if ( sizeOfChar == sizeof(char) ) + if ( sizeOfChar == 1 ) { wxCharBuffer buf(m_filenames[i].mb_str(*wxConvFileName)); len = strlen(buf);