compilation warnings fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
550e6c014c
commit
5be55d562f
@ -237,7 +237,6 @@ wxSize wxChoice::DoGetBestSize() const
|
||||
#endif
|
||||
{
|
||||
wxMacPortStateHelper st( UMAGetWindowPort( (WindowRef) MacGetRootWindow() ) ) ;
|
||||
Rect drawRect ;
|
||||
wxFontRefData * font = (wxFontRefData*) m_font.GetRefData() ;
|
||||
if ( font )
|
||||
{
|
||||
@ -273,7 +272,6 @@ wxSize wxChoice::DoGetBestSize() const
|
||||
// Add room for the popup arrow
|
||||
lbWidth += 2 * lbHeight ;
|
||||
// And just a bit more
|
||||
int cy = 12 ;
|
||||
int cx = ::TextWidth( "X" , 0 , 1 ) ;
|
||||
lbWidth += cx ;
|
||||
|
||||
|
@ -1322,7 +1322,10 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
|
||||
#else
|
||||
TECObjectRef ec;
|
||||
status = TECCreateConverter(&ec,
|
||||
wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman, kTextEncodingUnicodeDefault);
|
||||
wxApp::s_macDefaultEncodingIsPC
|
||||
? (int)kTextEncodingWindowsLatin1
|
||||
: (int)kTextEncodingMacRoman,
|
||||
kTextEncodingUnicodeDefault);
|
||||
|
||||
wxASSERT_MSG( status == noErr , wxT("couldn't start converter") ) ;
|
||||
ByteCount byteOutLen ;
|
||||
@ -1369,8 +1372,8 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
|
||||
status = ::ATSUMeasureText( atsuLayout, kATSUFromTextBeginning, kATSUToTextEnd,
|
||||
&textBefore , &textAfter, &ascent , &descent );
|
||||
|
||||
drawX += sin(angle/RAD2DEG) * FixedToInt(ascent) ;
|
||||
drawY += cos(angle/RAD2DEG) * FixedToInt(ascent) ;
|
||||
drawX += (int)(sin(angle/RAD2DEG) * FixedToInt(ascent));
|
||||
drawY += (int)(cos(angle/RAD2DEG) * FixedToInt(ascent));
|
||||
status = ::ATSUDrawText( atsuLayout, kATSUFromTextBeginning, kATSUToTextEnd,
|
||||
IntToFixed(drawX) , IntToFixed(drawY) );
|
||||
wxASSERT_MSG( status == noErr , wxT("couldn't draw the rotated text") );
|
||||
@ -1808,7 +1811,7 @@ void wxDC::MacInstallFont() const
|
||||
} ;
|
||||
Boolean kTrue = true ;
|
||||
Boolean kFalse = false ;
|
||||
BslnBaselineClass kBaselineDefault = kBSLNHangingBaseline ;
|
||||
//BslnBaselineClass kBaselineDefault = kBSLNHangingBaseline ;
|
||||
ATSUVerticalCharacterType kHorizontal = kATSUStronglyHorizontal;
|
||||
ATSUAttributeValuePtr atsuValues[sizeof(atsuTags)/sizeof(ATSUAttributeTag)] =
|
||||
{
|
||||
|
@ -363,7 +363,7 @@ void wxMenu::MacEnableMenu( bool bDoEnable )
|
||||
void wxMenu::MacBeforeDisplay( bool isSubMenu )
|
||||
{
|
||||
wxMenuItem* previousItem = NULL ;
|
||||
int pos ;
|
||||
size_t pos ;
|
||||
wxMenuItemList::Node *node;
|
||||
wxMenuItem *item;
|
||||
for (pos = 0, node = GetMenuItems().GetFirst(); node; node = node->GetNext(), pos++)
|
||||
@ -382,7 +382,9 @@ void wxMenu::MacBeforeDisplay( bool isSubMenu )
|
||||
if ( item->GetId() == wxApp::s_macPreferencesMenuItemId || item->GetId() == wxApp::s_macExitMenuItemId)
|
||||
{
|
||||
ChangeMenuItemAttributes( MAC_WXHMENU( GetHMenu() ) , pos + 1, kMenuItemAttrHidden, 0 );
|
||||
if ( GetMenuItems().GetCount() == pos + 1 && previousItem != NULL && previousItem->IsSeparator() )
|
||||
if ( GetMenuItems().GetCount() == pos + 1 &&
|
||||
previousItem != NULL &&
|
||||
previousItem->IsSeparator() )
|
||||
{
|
||||
ChangeMenuItemAttributes( MAC_WXHMENU( GetHMenu() ) , pos , kMenuItemAttrHidden, 0 );
|
||||
}
|
||||
|
@ -234,8 +234,8 @@ void wxMacCarbonPrintData::TransferTo( wxPageSetupData* data )
|
||||
(int)(((double) rPage.top - rPaper.top ) * pt2mm) ) ) ;
|
||||
|
||||
data->SetMinMarginBottomRight( wxPoint (
|
||||
((double) rPaper.right - rPage.right ) * pt2mm ,
|
||||
((double) rPaper.bottom - rPage.bottom ) * pt2mm ) ) ;
|
||||
(wxCoord)(((double) rPaper.right - rPage.right ) * pt2mm),
|
||||
(wxCoord)(((double) rPaper.bottom - rPage.bottom ) * pt2mm)) ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -325,8 +325,6 @@ bool wxToolBar::Realize()
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
||||
int separatorSize = GetToolSize().x / 4 ;
|
||||
|
||||
node = m_tools.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
|
@ -844,7 +844,7 @@ void wxTopLevelWindowMac::MacFireMouseEvent(
|
||||
|
||||
if ( kind == mouseDown )
|
||||
{
|
||||
if ( timestamp - gs_lastWhen <= GetDblTime() )
|
||||
if ( timestamp - gs_lastWhen <= (long) GetDblTime() )
|
||||
{
|
||||
if ( abs( localwhere.h - gs_lastWhere.h ) < 3 && abs( localwhere.v - gs_lastWhere.v ) < 3 )
|
||||
{
|
||||
|
@ -617,25 +617,33 @@ TECObjectRef s_TECPlatformToNativeC = NULL ;
|
||||
TECObjectRef s_TECNativeCToPlatform = NULL ;
|
||||
void wxMacSetupConverters()
|
||||
{
|
||||
// if we assume errors are happening here we need low level debugging since the high level assert will use the encoders that
|
||||
// are not yet setup...
|
||||
// if we assume errors are happening here we need low level debugging
|
||||
// since the high level assert will use the encoders that are not yet
|
||||
// setup...
|
||||
const int kEncoding = wxApp::s_macDefaultEncodingIsPC
|
||||
? (int)kTextEncodingWindowsLatin1
|
||||
: (int)kTextEncodingMacRoman;
|
||||
|
||||
OSStatus status = noErr ;
|
||||
status = TECCreateConverter(&s_TECNativeCToUnicode,
|
||||
wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman, kTextEncodingUnicodeDefault);
|
||||
kEncoding,
|
||||
kTextEncodingUnicodeDefault);
|
||||
|
||||
|
||||
status = TECCreateConverter(&s_TECUnicodeToNativeC,
|
||||
kTextEncodingUnicodeDefault, wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman);
|
||||
kTextEncodingUnicodeDefault,
|
||||
kEncoding);
|
||||
|
||||
if ( wxApp::s_macDefaultEncodingIsPC )
|
||||
{
|
||||
status = TECCreateConverter(&s_TECPlatformToNativeC,
|
||||
kTextEncodingMacRoman, wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman);
|
||||
kTextEncodingMacRoman,
|
||||
kTextEncodingWindowsLatin1);
|
||||
|
||||
|
||||
status = TECCreateConverter(&s_TECNativeCToPlatform,
|
||||
wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman , kTextEncodingMacRoman );
|
||||
kTextEncodingWindowsLatin1,
|
||||
kTextEncodingMacRoman);
|
||||
}
|
||||
}
|
||||
|
||||
@ -685,7 +693,6 @@ wxString wxMacMakeStringFromCString( const char * from , int len )
|
||||
memcpy( buf , from , len ) ;
|
||||
else
|
||||
{
|
||||
OSStatus status = noErr ;
|
||||
ByteCount byteOutLen ;
|
||||
ByteCount byteInLen = len ;
|
||||
ByteCount byteBufferLen = byteInLen ;
|
||||
|
@ -237,7 +237,6 @@ wxSize wxChoice::DoGetBestSize() const
|
||||
#endif
|
||||
{
|
||||
wxMacPortStateHelper st( UMAGetWindowPort( (WindowRef) MacGetRootWindow() ) ) ;
|
||||
Rect drawRect ;
|
||||
wxFontRefData * font = (wxFontRefData*) m_font.GetRefData() ;
|
||||
if ( font )
|
||||
{
|
||||
@ -273,7 +272,6 @@ wxSize wxChoice::DoGetBestSize() const
|
||||
// Add room for the popup arrow
|
||||
lbWidth += 2 * lbHeight ;
|
||||
// And just a bit more
|
||||
int cy = 12 ;
|
||||
int cx = ::TextWidth( "X" , 0 , 1 ) ;
|
||||
lbWidth += cx ;
|
||||
|
||||
|
@ -1322,7 +1322,10 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
|
||||
#else
|
||||
TECObjectRef ec;
|
||||
status = TECCreateConverter(&ec,
|
||||
wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman, kTextEncodingUnicodeDefault);
|
||||
wxApp::s_macDefaultEncodingIsPC
|
||||
? (int)kTextEncodingWindowsLatin1
|
||||
: (int)kTextEncodingMacRoman,
|
||||
kTextEncodingUnicodeDefault);
|
||||
|
||||
wxASSERT_MSG( status == noErr , wxT("couldn't start converter") ) ;
|
||||
ByteCount byteOutLen ;
|
||||
@ -1369,8 +1372,8 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
|
||||
status = ::ATSUMeasureText( atsuLayout, kATSUFromTextBeginning, kATSUToTextEnd,
|
||||
&textBefore , &textAfter, &ascent , &descent );
|
||||
|
||||
drawX += sin(angle/RAD2DEG) * FixedToInt(ascent) ;
|
||||
drawY += cos(angle/RAD2DEG) * FixedToInt(ascent) ;
|
||||
drawX += (int)(sin(angle/RAD2DEG) * FixedToInt(ascent));
|
||||
drawY += (int)(cos(angle/RAD2DEG) * FixedToInt(ascent));
|
||||
status = ::ATSUDrawText( atsuLayout, kATSUFromTextBeginning, kATSUToTextEnd,
|
||||
IntToFixed(drawX) , IntToFixed(drawY) );
|
||||
wxASSERT_MSG( status == noErr , wxT("couldn't draw the rotated text") );
|
||||
@ -1808,7 +1811,7 @@ void wxDC::MacInstallFont() const
|
||||
} ;
|
||||
Boolean kTrue = true ;
|
||||
Boolean kFalse = false ;
|
||||
BslnBaselineClass kBaselineDefault = kBSLNHangingBaseline ;
|
||||
//BslnBaselineClass kBaselineDefault = kBSLNHangingBaseline ;
|
||||
ATSUVerticalCharacterType kHorizontal = kATSUStronglyHorizontal;
|
||||
ATSUAttributeValuePtr atsuValues[sizeof(atsuTags)/sizeof(ATSUAttributeTag)] =
|
||||
{
|
||||
|
@ -363,7 +363,7 @@ void wxMenu::MacEnableMenu( bool bDoEnable )
|
||||
void wxMenu::MacBeforeDisplay( bool isSubMenu )
|
||||
{
|
||||
wxMenuItem* previousItem = NULL ;
|
||||
int pos ;
|
||||
size_t pos ;
|
||||
wxMenuItemList::Node *node;
|
||||
wxMenuItem *item;
|
||||
for (pos = 0, node = GetMenuItems().GetFirst(); node; node = node->GetNext(), pos++)
|
||||
@ -382,7 +382,9 @@ void wxMenu::MacBeforeDisplay( bool isSubMenu )
|
||||
if ( item->GetId() == wxApp::s_macPreferencesMenuItemId || item->GetId() == wxApp::s_macExitMenuItemId)
|
||||
{
|
||||
ChangeMenuItemAttributes( MAC_WXHMENU( GetHMenu() ) , pos + 1, kMenuItemAttrHidden, 0 );
|
||||
if ( GetMenuItems().GetCount() == pos + 1 && previousItem != NULL && previousItem->IsSeparator() )
|
||||
if ( GetMenuItems().GetCount() == pos + 1 &&
|
||||
previousItem != NULL &&
|
||||
previousItem->IsSeparator() )
|
||||
{
|
||||
ChangeMenuItemAttributes( MAC_WXHMENU( GetHMenu() ) , pos , kMenuItemAttrHidden, 0 );
|
||||
}
|
||||
|
@ -234,8 +234,8 @@ void wxMacCarbonPrintData::TransferTo( wxPageSetupData* data )
|
||||
(int)(((double) rPage.top - rPaper.top ) * pt2mm) ) ) ;
|
||||
|
||||
data->SetMinMarginBottomRight( wxPoint (
|
||||
((double) rPaper.right - rPage.right ) * pt2mm ,
|
||||
((double) rPaper.bottom - rPage.bottom ) * pt2mm ) ) ;
|
||||
(wxCoord)(((double) rPaper.right - rPage.right ) * pt2mm),
|
||||
(wxCoord)(((double) rPaper.bottom - rPage.bottom ) * pt2mm)) ) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -325,8 +325,6 @@ bool wxToolBar::Realize()
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
||||
int separatorSize = GetToolSize().x / 4 ;
|
||||
|
||||
node = m_tools.GetFirst();
|
||||
while (node)
|
||||
{
|
||||
|
@ -844,7 +844,7 @@ void wxTopLevelWindowMac::MacFireMouseEvent(
|
||||
|
||||
if ( kind == mouseDown )
|
||||
{
|
||||
if ( timestamp - gs_lastWhen <= GetDblTime() )
|
||||
if ( timestamp - gs_lastWhen <= (long) GetDblTime() )
|
||||
{
|
||||
if ( abs( localwhere.h - gs_lastWhere.h ) < 3 && abs( localwhere.v - gs_lastWhere.v ) < 3 )
|
||||
{
|
||||
|
@ -617,25 +617,33 @@ TECObjectRef s_TECPlatformToNativeC = NULL ;
|
||||
TECObjectRef s_TECNativeCToPlatform = NULL ;
|
||||
void wxMacSetupConverters()
|
||||
{
|
||||
// if we assume errors are happening here we need low level debugging since the high level assert will use the encoders that
|
||||
// are not yet setup...
|
||||
// if we assume errors are happening here we need low level debugging
|
||||
// since the high level assert will use the encoders that are not yet
|
||||
// setup...
|
||||
const int kEncoding = wxApp::s_macDefaultEncodingIsPC
|
||||
? (int)kTextEncodingWindowsLatin1
|
||||
: (int)kTextEncodingMacRoman;
|
||||
|
||||
OSStatus status = noErr ;
|
||||
status = TECCreateConverter(&s_TECNativeCToUnicode,
|
||||
wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman, kTextEncodingUnicodeDefault);
|
||||
kEncoding,
|
||||
kTextEncodingUnicodeDefault);
|
||||
|
||||
|
||||
status = TECCreateConverter(&s_TECUnicodeToNativeC,
|
||||
kTextEncodingUnicodeDefault, wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman);
|
||||
kTextEncodingUnicodeDefault,
|
||||
kEncoding);
|
||||
|
||||
if ( wxApp::s_macDefaultEncodingIsPC )
|
||||
{
|
||||
status = TECCreateConverter(&s_TECPlatformToNativeC,
|
||||
kTextEncodingMacRoman, wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman);
|
||||
kTextEncodingMacRoman,
|
||||
kTextEncodingWindowsLatin1);
|
||||
|
||||
|
||||
status = TECCreateConverter(&s_TECNativeCToPlatform,
|
||||
wxApp::s_macDefaultEncodingIsPC ? kTextEncodingWindowsLatin1 : kTextEncodingMacRoman , kTextEncodingMacRoman );
|
||||
kTextEncodingWindowsLatin1,
|
||||
kTextEncodingMacRoman);
|
||||
}
|
||||
}
|
||||
|
||||
@ -685,7 +693,6 @@ wxString wxMacMakeStringFromCString( const char * from , int len )
|
||||
memcpy( buf , from , len ) ;
|
||||
else
|
||||
{
|
||||
OSStatus status = noErr ;
|
||||
ByteCount byteOutLen ;
|
||||
ByteCount byteInLen = len ;
|
||||
ByteCount byteBufferLen = byteInLen ;
|
||||
|
Loading…
Reference in New Issue
Block a user