[Libreoffice-commits] .: vcl/inc

Tor Lillqvist tml at kemper.freedesktop.org
Sat Jul 23 07:00:36 PDT 2011


 vcl/inc/aqua/salconst.h |   25 -------------------------
 1 file changed, 25 deletions(-)

New commits:
commit d14dcc2b49f4ee1c13c5d211b25657401149121c
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Jul 23 16:54:08 2011 +0300

    Bin unused symbolic constants
    
    Is it really good Mac style programming practice to define your own
    non-namespaced kThisAndThat constants that look like they might be
    defined by some platform API?
    
    And seriously, defining symbolic constants for small integers like
    const kOneBit = 1 ?  These were not used, but if they had been would
    it really be cleaner to use the identifier "kOneBit" instead of a
    plain number 1?
    
    Cases where small integers have magic meaning and don't stand for just
    themselves are obviously different; there it makes sense to use
    symbolic names and not the integer values. But in the case of things
    like kOneBit that is not the case, as one might guesss from the name
    it was supposed to be used to indicate a bit depth of one. Etc.

diff --git a/vcl/inc/aqua/salconst.h b/vcl/inc/aqua/salconst.h
index 50971a8..87bdbf4 100644
--- a/vcl/inc/aqua/salconst.h
+++ b/vcl/inc/aqua/salconst.h
@@ -33,23 +33,6 @@
 // - Constants -
 // -------------------
 
-static const unsigned short kByteMask = 0xFF;
-
-static const unsigned short kOneByte  =  8;
-static const unsigned short kTwoBytes = 16;
-
-static const unsigned short kOneBit     =  1;
-static const unsigned short kFiveBits   =  5;
-static const unsigned short kEightBits  =  8;
-static const unsigned short kTenBits    = 10;
-static const unsigned short kElevenBits = 11;
-
-static const unsigned short kBlackAndWhite  =  1;
-static const unsigned short kFourBitColor   =  4;
-static const unsigned short kEightBitColor  =  8;
-static const unsigned short kThousandsColor = 16;
-static const unsigned short kTrueColor      = 32;
-
 static const unsigned long k16BitRedColorMask   = 0x00007c00;
 static const unsigned long k16BitGreenColorMask = 0x000003e0;
 static const unsigned long k16BitBlueColorMask  = 0x0000001f;
@@ -58,14 +41,6 @@ static const unsigned long k32BitRedColorMask   = 0x00ff0000;
 static const unsigned long k32BitGreenColorMask = 0x0000ff00;
 static const unsigned long k32BitBlueColorMask  = 0x000000ff;
 
-static const unsigned short kPixMapCmpSizeOneBit    =  1;
-static const unsigned short kPixMapCmpSizeFourBits  =  4;
-static const unsigned short kPixMapCmpSizeFiveBits  =  5;
-static const unsigned short kPixMapCmpSizeEightBits =  8;
-
-static const long kPixMapHRes = 72;
-static const long kPixMapVRes = 72;
-
 #endif // _SV_SALCONST_H
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list