From c97bfd16f94873a437cb92a30ebd11879f114e0c Mon Sep 17 00:00:00 2001 From: Jody Northup Date: Mon, 15 Jun 2009 10:10:22 +0000 Subject: made Graphics::PixelFormat(ColorMode) constructor explicit, removed Graphics::PixelFormat(int bitFormat) constructor that was never really implemented anyway svn-id: r41540 --- graphics/pixelformat.h | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'graphics/pixelformat.h') diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h index ef856e8735..b08321efd7 100644 --- a/graphics/pixelformat.h +++ b/graphics/pixelformat.h @@ -91,43 +91,10 @@ struct PixelFormat { rShift = RShift, gShift = GShift, bShift = BShift, aShift = AShift; } - //Copy constructor - //Is this necessary? - inline PixelFormat(const PixelFormat &format) { - bytesPerPixel = format.bytesPerPixel; - - rLoss = format.rLoss; - gLoss = format.gLoss; - bLoss = format.bLoss; - aLoss = format.aLoss; - - rShift = format.rShift; - gShift = format.gShift; - bShift = format.bShift; - aShift = format.aShift; - } - - //Convenience constructor from bitformat number - //TODO: BGR support - //TODO: Specify alpha position -/* PixelFormat(int bitFormat) { - bytesPerPixel = ColorMasks::kBytesPerPixel; - - rLoss = 8 - ColorMasks::kRedBits; - gLoss = 8 - ColorMasks::kGreenBits; - bLoss = 8 - ColorMasks::kBlueBits; - aLoss = 8 - ColorMasks::kAlphaBits; - - rShift = ColorMasks::kRedShift; - gShift = ColorMasks::kGreenShift; - bShift = ColorMasks::kBlueShift; - aShift = ColorMasks::kAlphaShift; - };*/ - //Convenience constructor from enum type //TODO: BGR support //TODO: Specify alpha position - inline PixelFormat(ColorMode mode) { + explicit inline PixelFormat(ColorMode mode) { switch (mode) { case kFormatRGB555: aLoss = 8; -- cgit v1.2.3