From 476e5f73c1fb1df8318a00fe51fcb3d24fa7d70f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 6 Apr 2000 13:08:23 +0000 Subject: [PATCH] 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 --- src/common/fs_mem.cpp | 2 +- src/generic/treectrl.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/common/fs_mem.cpp b/src/common/fs_mem.cpp index 650e51165b..d1e3b30179 100644 --- a/src/common/fs_mem.cpp +++ b/src/common/fs_mem.cpp @@ -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 { diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp index 7daf6eb98b..9a2081bf94 100644 --- a/src/generic/treectrl.cpp +++ b/src/generic/treectrl.cpp @@ -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 );