[haiku-commits] haiku: hrev44434 - src/add-ons/media/media-add-ons/mixer headers/libs/print/libprint src/libs/print/libprint

  • From: jscipione@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 30 Jul 2012 08:46:34 +0200 (CEST)

hrev44434 adds 2 changesets to branch 'master'
old head: c15ad4e6b98379e055bd98b0cd2bf624b0af441a
new head: b79561ad9cdd8216c6c88dcc1d947c0dc832887a

----------------------------------------------------------------------------

78341a9: Revert "Fix gcc2 build on Mac OS X Lion"
  
  now that Alex Smith has fixed the build system on Lion this
  work-around can now be reverted.
  
  This reverts commit 7c369a4b3ff7b9204bb71c039489a82e78d55955.

b79561a: Redo some reverted style changes.

                                     [ John Scipione <jscipione@xxxxxxxxx> ]

----------------------------------------------------------------------------

4 files changed, 10 insertions(+), 26 deletions(-)
headers/libs/print/libprint/Halftone.h             |    8 --------
.../media/media-add-ons/mixer/Resampler.cpp        |    4 ++--
src/add-ons/media/media-add-ons/mixer/Resampler.h  |    9 ---------
src/libs/print/libprint/Halftone.cpp               |   15 ++++++++-------

############################################################################

Commit:      78341a9351713b13dc9097957d467dfe6e4b636c
URL:         http://cgit.haiku-os.org/haiku/commit/?id=78341a9
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Mon Jul 30 06:10:08 2012 UTC

Revert "Fix gcc2 build on Mac OS X Lion"

now that Alex Smith has fixed the build system on Lion this
work-around can now be reverted.

This reverts commit 7c369a4b3ff7b9204bb71c039489a82e78d55955.

----------------------------------------------------------------------------

diff --git a/headers/libs/print/libprint/Halftone.h 
b/headers/libs/print/libprint/Halftone.h
index 4229749..f72691a 100644
--- a/headers/libs/print/libprint/Halftone.h
+++ b/headers/libs/print/libprint/Halftone.h
@@ -102,14 +102,6 @@ protected:
                        void            SetupErrorBuffer(int x, int y, int 
width);
                        void            DitherFloydSteinberg(uchar* destination,
                                                        const uchar* source, 
int x, int y, int width);
-                                               // Do nothing method to get 
around a bug in
-                                               // the gcc2 cross-compiler 
built on Mac OS X
-                                               // Lion where a compiler error 
occurs when
-                                               // assigning a member function 
pointer to NULL
-                                               // or 0: cast specifies 
signature type.
-                                               // However, this should be 
legal according to
-                                               // the C++03 standard.
-                       void            DitherNone(uchar*, const uchar*, int, 
int, int) {};
 
 private:
        enum {
diff --git a/src/add-ons/media/media-add-ons/mixer/Resampler.cpp 
b/src/add-ons/media/media-add-ons/mixer/Resampler.cpp
index 1b4f987..1a758c2 100644
--- a/src/add-ons/media/media-add-ons/mixer/Resampler.cpp
+++ b/src/add-ons/media/media-add-ons/mixer/Resampler.cpp
@@ -21,7 +21,7 @@
 
 Resampler::Resampler(uint32 src_format, uint32 dst_format)
        :
-       fFunc(&Resampler::no_conversion)
+       fFunc(0)
 {
        if (dst_format == media_raw_audio_format::B_AUDIO_FLOAT) {
                switch (src_format) {
@@ -81,7 +81,7 @@ Resampler::~Resampler()
 status_t
 Resampler::InitCheck() const
 {
-       return fFunc != &Resampler::no_conversion ? B_OK : B_ERROR;
+       return fFunc != 0 ? B_OK : B_ERROR;
 }
 
 
diff --git a/src/add-ons/media/media-add-ons/mixer/Resampler.h 
b/src/add-ons/media/media-add-ons/mixer/Resampler.h
index 3e6b531..9ad1b64 100644
--- a/src/add-ons/media/media-add-ons/mixer/Resampler.h
+++ b/src/add-ons/media/media-add-ons/mixer/Resampler.h
@@ -65,15 +65,6 @@ private:
                                                                        int32 
srcSampleOffset, int32 srcSampleCount,
                                                                        void* 
dest, int32 destSampleOffset,
                                                                        int32 
destSampleCount, float gain);
-                                                               // Do nothing 
method to get around a bug in
-                                                               // the gcc2 
cross-compiler built on Mac OS X
-                                                               // Lion where a 
compiler error occurs when
-                                                               // assigning a 
member function pointer to NULL
-                                                               // or 0: cast 
specifies signature type.
-                                                               // However, 
this should be legal according to
-                                                               // the C++03 
standard.
-                       void                            no_conversion(const 
void*, int32, int32, void*,
-                                                                       int32, 
int32, float) {};
 };
 
 
diff --git a/src/libs/print/libprint/Halftone.cpp 
b/src/libs/print/libprint/Halftone.cpp
index 10e37c0..82b5e6e 100644
--- a/src/libs/print/libprint/Halftone.cpp
+++ b/src/libs/print/libprint/Halftone.cpp
@@ -31,21 +31,21 @@ ToGray(ColorRGB32 c)
 static uint
 GetRedValue(ColorRGB32 c)
 {
-       return c.little.red;
+       return c.little.red;    
 }
 
 
 static uint
 GetGreenValue(ColorRGB32 c)
 {
-       return c.little.green;
+       return c.little.green;  
 }
 
 
 static uint
 GetBlueValue(ColorRGB32 c)
 {
-       return c.little.blue;
+       return c.little.blue;   
 }
 
 
@@ -56,11 +56,11 @@ Halftone::Halftone(color_space colorSpace, double gamma, 
double min,
        fGray       = ToGray;
        SetPlanes(kPlaneMonochrome1);
        SetBlackValue(kHighValueMeansBlack);
-
+       
        InitFloydSteinberg();
-
+       
        CreateGammaTable(gamma, min);
-
+       
        if (ditherType == kTypeFloydSteinberg) {
                fDither = &Halftone::DitherFloydSteinberg;
                return;
@@ -79,13 +79,13 @@ Halftone::Halftone(color_space colorSpace, double gamma, 
double min,
        }
 
        switch (colorSpace) {
-               case B_RGB32:
-               case B_RGB32_BIG:
-                       fDither = &Halftone::DitherRGB32;
-                       break;
-               default:
-                       fDither = &Halftone::DitherNone;
-                       break;
+       case B_RGB32:
+       case B_RGB32_BIG:
+               fDither = &Halftone::DitherRGB32;
+               break;
+       default:
+               fDither = NULL;
+               break;
        }
 }
 
@@ -364,3 +364,4 @@ Halftone::DitherFloydSteinberg(uchar *destination, const 
uchar* source0,
                *destination = ConvertUsingBlackValue(cur);
        }
 }
+

############################################################################

Revision:    hrev44434
Commit:      b79561ad9cdd8216c6c88dcc1d947c0dc832887a
URL:         http://cgit.haiku-os.org/haiku/commit/?id=b79561a
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Mon Jul 30 06:45:45 2012 UTC

Redo some reverted style changes.

----------------------------------------------------------------------------

diff --git a/src/libs/print/libprint/Halftone.cpp 
b/src/libs/print/libprint/Halftone.cpp
index 82b5e6e..5bd3857 100644
--- a/src/libs/print/libprint/Halftone.cpp
+++ b/src/libs/print/libprint/Halftone.cpp
@@ -31,21 +31,21 @@ ToGray(ColorRGB32 c)
 static uint
 GetRedValue(ColorRGB32 c)
 {
-       return c.little.red;    
+       return c.little.red;
 }
 
 
 static uint
 GetGreenValue(ColorRGB32 c)
 {
-       return c.little.green;  
+       return c.little.green;
 }
 
 
 static uint
 GetBlueValue(ColorRGB32 c)
 {
-       return c.little.blue;   
+       return c.little.blue;
 }
 
 
@@ -56,11 +56,11 @@ Halftone::Halftone(color_space colorSpace, double gamma, 
double min,
        fGray       = ToGray;
        SetPlanes(kPlaneMonochrome1);
        SetBlackValue(kHighValueMeansBlack);
-       
+
        InitFloydSteinberg();
-       
+
        CreateGammaTable(gamma, min);
-       
+
        if (ditherType == kTypeFloydSteinberg) {
                fDither = &Halftone::DitherFloydSteinberg;
                return;


Other related posts: