From 8d22d5a76b0d1758f05984196f39e88325178558 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Wed, 15 Jun 2011 20:25:50 +0000 Subject: [PATCH] * fix build of Debugger with gcc2 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42197 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../user_interface/gui/inspector_window/MemoryView.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp b/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp index c248f3a579..341232c73f 100644 --- a/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp +++ b/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp @@ -100,8 +100,8 @@ MemoryView::Draw(BRect rect) char buffer[16]; - int32 startLine = rect.top / fLineHeight; - int32 endLine = rect.bottom / fLineHeight + 1; + int32 startLine = int32(rect.top / fLineHeight); + int32 endLine = int32(rect.bottom / fLineHeight) + 1; int32 startByte = fNybblesPerLine / 2 * startLine; uint16* currentAddress = (uint16*)(fTargetBlock->BaseAddress() + startByte); @@ -174,14 +174,15 @@ MemoryView::_RecalcScrollBars() BScrollBar *scrollBar = ScrollBar(B_VERTICAL); if (fTargetBlock != NULL) { BRect bounds = Bounds(); - fNybblesPerLine = bounds.Width() / fCharWidth; + fNybblesPerLine = int32(bounds.Width() / fCharWidth); // we allocate 8 characters for the starting address of the current // line plus some spacing to separate that from the data fNybblesPerLine -= 10; // also allocate a space between each 16-bit grouping fNybblesPerLine -= (fNybblesPerLine / 4) - 1; fNybblesPerLine &= ~3; - int32 lineCount = ceil(2 * fTargetBlock->Size() / fNybblesPerLine); + int32 lineCount + = (int32)ceil(2 * fTargetBlock->Size() / fNybblesPerLine); float totalHeight = lineCount * fLineHeight; max = totalHeight - bounds.Height(); scrollBar->SetProportion(bounds.Height() / totalHeight);