diff --git a/Base/include/Pixel.h b/Base/include/Pixel.h index 34670d4..bc3c126 100644 --- a/Base/include/Pixel.h +++ b/Base/include/Pixel.h @@ -58,9 +58,9 @@ namespace FasTC { -class Pixel : public Vector4 { +class Pixel : public Vector4 { protected: - typedef uint16 ChannelType; + typedef int16 ChannelType; typedef Vector4 VectorType; uint8 m_BitDepth[4]; diff --git a/Base/test/TestPixel.cpp b/Base/test/TestPixel.cpp index abdcc94..59c50da 100644 --- a/Base/test/TestPixel.cpp +++ b/Base/test/TestPixel.cpp @@ -84,7 +84,7 @@ TEST(Pixel, FourWideConstructor) { FasTC::Pixel q(static_cast(1 << 16), 6, -2, 5, 4); EXPECT_EQ(q.R(), 6); - EXPECT_EQ(q.G(), static_cast(-2)); + EXPECT_EQ(q.G(), -2); EXPECT_EQ(q.B(), 5); EXPECT_EQ(q.A(), 0); @@ -311,7 +311,7 @@ TEST(Pixel, ByteClamp) { p.ClampByte(); EXPECT_EQ(p.A(), 255); EXPECT_EQ(p.R(), 3); - EXPECT_EQ(p.G(), 255); + EXPECT_EQ(p.G(), 0); EXPECT_EQ(p.B(), 10); }