some long to int warnings from HP-UX log fixed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-04-06 13:08:23 +00:00
parent f30f5bd933
commit 476e5f73c1
2 changed files with 5 additions and 3 deletions

View File

@@ -159,7 +159,7 @@ bool wxMemoryFSHandler::CheckHash(const wxString& filename)
wxMemoryOutputStream mems;
if (image.Ok() && image.SaveFile(mems, type))
if (image.Ok() && image.SaveFile(mems, (int)type))
m_Hash -> Put(filename, new MemFSHashObj(mems));
else
{

View File

@@ -1655,8 +1655,10 @@ void wxTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
}
dc.SetBackgroundMode(wxTRANSPARENT);
dc.DrawText( item->GetText(), image_w + item->GetX(), (wxCoord)item->GetY()
+ ((total_h > text_h) ? (total_h - text_h)/2 : 0));
int extraH = (total_h > text_h) ? (total_h - text_h)/2 : 0;
dc.DrawText( item->GetText(),
(wxCoord)(image_w + item->GetX()),
(wxCoord)(item->GetY() + extraH));
// restore normal font
dc.SetFont( m_normalFont );