From 099e08d534a12c3321d80e2b09cf4677bb79b92f Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Mon, 13 Oct 2008 08:47:21 +0000 Subject: [PATCH] fixed gcc4 warnings git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28022 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/preferences/screen/RefreshSlider.cpp | 4 ++-- src/preferences/screen/RefreshSlider.h | 2 +- src/preferences/screen/RefreshWindow.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/preferences/screen/RefreshSlider.cpp b/src/preferences/screen/RefreshSlider.cpp index 22b35cc6bf..cd72ef9c54 100644 --- a/src/preferences/screen/RefreshSlider.cpp +++ b/src/preferences/screen/RefreshSlider.cpp @@ -21,7 +21,7 @@ RefreshSlider::RefreshSlider(BRect frame, float min, float max, uint32 resizingMode) : BSlider(frame, "Screen", "Refresh Rate:", - new BMessage(SLIDER_INVOKE_MSG), rintf(min * 10), rintf(max * 10), + new BMessage(SLIDER_INVOKE_MSG), (int32)rintf(min * 10), (int32)rintf(max * 10), B_BLOCK_THUMB, resizingMode), fStatus(new (std::nothrow) char[32]) { @@ -87,7 +87,7 @@ RefreshSlider::KeyDown(const char *bytes, int32 numBytes) } -char* +const char* RefreshSlider::UpdateText() const { if (fStatus != NULL) diff --git a/src/preferences/screen/RefreshSlider.h b/src/preferences/screen/RefreshSlider.h index cc1b808419..41c6f49937 100644 --- a/src/preferences/screen/RefreshSlider.h +++ b/src/preferences/screen/RefreshSlider.h @@ -20,7 +20,7 @@ class RefreshSlider : public BSlider { virtual ~RefreshSlider(); virtual void DrawFocusMark(); - virtual char* UpdateText() const; + virtual const char* UpdateText() const; virtual void KeyDown(const char* bytes, int32 numBytes); private: diff --git a/src/preferences/screen/RefreshWindow.cpp b/src/preferences/screen/RefreshWindow.cpp index b50777c7ff..58a23ca8b9 100644 --- a/src/preferences/screen/RefreshWindow.cpp +++ b/src/preferences/screen/RefreshWindow.cpp @@ -41,7 +41,7 @@ RefreshWindow::RefreshWindow(BPoint position, float current, float min, float ma rect.top += stringView->Bounds().Height() + 14; fRefreshSlider = new RefreshSlider(rect, min, max, B_FOLLOW_TOP | B_FOLLOW_LEFT_RIGHT); - fRefreshSlider->SetValue(rint(current * 10)); + fRefreshSlider->SetValue((int32)rintf(current * 10)); fRefreshSlider->SetModificationMessage(new BMessage(SLIDER_MODIFICATION_MSG)); float width, height; fRefreshSlider->GetPreferredSize(&width, &height);