From 9a321797d9629b1bbbdee38ddddeca3a993679ab Mon Sep 17 00:00:00 2001 From: Karsten Heimrich Date: Tue, 21 Oct 2008 20:21:16 +0000 Subject: [PATCH] * fix wrong cast * fix r5 target build git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28268 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/libs/print/libprint/JSDSlider.h | 6 ++++-- .../print/drivers/pdf/source/AdvancedSettingsWindow.cpp | 2 +- src/libs/print/libprint/JSDSlider.cpp | 9 ++++++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/headers/libs/print/libprint/JSDSlider.h b/headers/libs/print/libprint/JSDSlider.h index c69ab49c0e..2c1a042bc3 100644 --- a/headers/libs/print/libprint/JSDSlider.h +++ b/headers/libs/print/libprint/JSDSlider.h @@ -21,9 +21,11 @@ public: BMessage *msg, int32 min, int32 max, thumb_style t); virtual ~JSDSlider(); - +#ifdef __HAIKU__ virtual const char* UpdateText() const; - +#else + virtual char* UpdateText() const; +#endif private: mutable BString fResult; }; diff --git a/src/add-ons/print/drivers/pdf/source/AdvancedSettingsWindow.cpp b/src/add-ons/print/drivers/pdf/source/AdvancedSettingsWindow.cpp index aedd014d92..d842eeb6e6 100644 --- a/src/add-ons/print/drivers/pdf/source/AdvancedSettingsWindow.cpp +++ b/src/add-ons/print/drivers/pdf/source/AdvancedSettingsWindow.cpp @@ -81,7 +81,7 @@ AdvancedSettingsWindow::AdvancedSettingsWindow(BMessage *settings) if (settings->FindBool("create_xrefs", &fCreateXRefs) != B_OK) fCreateXRefs = false; - if (settings->FindInt32("close_option", (int32)&fCloseOption) != B_OK) + if (settings->FindInt32("close_option", (int32*)&fCloseOption) != B_OK) fCloseOption = kNever; BRect bounds(Bounds()); diff --git a/src/libs/print/libprint/JSDSlider.cpp b/src/libs/print/libprint/JSDSlider.cpp index 296915a478..bb4a858bed 100644 --- a/src/libs/print/libprint/JSDSlider.cpp +++ b/src/libs/print/libprint/JSDSlider.cpp @@ -26,7 +26,10 @@ JSDSlider::~JSDSlider() } -const char* +#ifdef __HAIKU__ +const +#endif +char* JSDSlider::UpdateText() const { // When the slider's Draw method is called, this method will also be called. @@ -46,5 +49,9 @@ JSDSlider::UpdateText() const } fResult.SetTo(string); +#ifdef __HAIKU__ return fResult.String(); +#else + return const_cast(fResult.String()); +#endif }