Fix harmless float to int conversion warnings in wxOSX build.
Add casts to truncate the values as the code intended anyhow. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65125 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2334,7 +2334,7 @@ wxSize wxBoxSizer::CalcMin()
|
|||||||
|
|
||||||
// Using the max ratio ensures that the min size is big enough for all
|
// Using the max ratio ensures that the min size is big enough for all
|
||||||
// items to have their min size and satisfy the proportions among them.
|
// items to have their min size and satisfy the proportions among them.
|
||||||
SizeInMajorDir(m_minSize) += maxMinSizeToProp*m_totalProportion;
|
SizeInMajorDir(m_minSize) += (int)(maxMinSizeToProp*m_totalProportion);
|
||||||
|
|
||||||
return m_minSize;
|
return m_minSize;
|
||||||
}
|
}
|
||||||
|
@@ -998,8 +998,8 @@ void wxMacControl::GetPosition( int &x, int &y ) const
|
|||||||
{
|
{
|
||||||
HIRect parent;
|
HIRect parent;
|
||||||
HIViewGetFrame( HIViewGetSuperview(m_controlRef), &parent );
|
HIViewGetFrame( HIViewGetSuperview(m_controlRef), &parent );
|
||||||
x -= parent.origin.x;
|
x -= (int)parent.origin.x;
|
||||||
y -= parent.origin.y;
|
y -= (int)parent.origin.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -503,10 +503,8 @@ wxSize wxNSTextViewControl::GetBestSize() const
|
|||||||
if (m_textView && [m_textView layoutManager])
|
if (m_textView && [m_textView layoutManager])
|
||||||
{
|
{
|
||||||
NSRect rect = [[m_textView layoutManager] usedRectForTextContainer: [m_textView textContainer]];
|
NSRect rect = [[m_textView layoutManager] usedRectForTextContainer: [m_textView textContainer]];
|
||||||
wxSize size = wxSize(rect.size.width, rect.size.height);
|
return wxSize((int)(rect.size.width + [m_textView textContainerInset].width),
|
||||||
size.x += [m_textView textContainerInset].width;
|
(int)(rect.size.height + [m_textView textContainerInset].height));
|
||||||
size.y += [m_textView textContainerInset].height;
|
|
||||||
return size;
|
|
||||||
}
|
}
|
||||||
return wxSize(0,0);
|
return wxSize(0,0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user