summaryrefslogtreecommitdiff
path: root/src/resources/dye_unittest.cc
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-03 23:02:14 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-18 19:36:33 +0300
commitd99a3f4a96b754a788c4a147be27dd212d90f743 (patch)
tree72e4ca7b883db78c3fd5564ce0f9496b0e440343 /src/resources/dye_unittest.cc
parent3d94db98d119b011646893468bb61f88a0019173 (diff)
downloadmv-d99a3f4a96b754a788c4a147be27dd212d90f743.tar.gz
mv-d99a3f4a96b754a788c4a147be27dd212d90f743.tar.bz2
mv-d99a3f4a96b754a788c4a147be27dd212d90f743.tar.xz
mv-d99a3f4a96b754a788c4a147be27dd212d90f743.zip
improve software A,S dye speed.
Diffstat (limited to 'src/resources/dye_unittest.cc')
-rw-r--r--src/resources/dye_unittest.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/dye_unittest.cc b/src/resources/dye_unittest.cc
index 08120f641..10059ca34 100644
--- a/src/resources/dye_unittest.cc
+++ b/src/resources/dye_unittest.cc
@@ -124,7 +124,7 @@ TEST(Dye, replaceSColor1)
data[1] = 0x02;
data[2] = 0x03;
data[3] = 0x10;
- palette.replaceSColor(&data[0]);
+ palette.replaceSColor(reinterpret_cast<uint32_t*>(&data[0]), 1);
EXPECT_EQ(0x01, data[0]);
EXPECT_EQ(0x02, data[1]);
EXPECT_EQ(0x03, data[2]);
@@ -139,7 +139,7 @@ TEST(Dye, replaceSColor2)
data[1] = 0x20;
data[2] = 0x30;
data[3] = 0x40;
- palette.replaceSColor(&data[0]);
+ palette.replaceSColor(reinterpret_cast<uint32_t*>(&data[0]), 1);
EXPECT_EQ(0x10, data[0]);
EXPECT_EQ(0x50, data[1]);
EXPECT_EQ(0x60, data[2]);
@@ -154,7 +154,7 @@ TEST(Dye, replaceSColor3)
data[1] = 0x20;
data[2] = 0x30;
data[3] = 0xff;
- palette.replaceSColor(&data[0]);
+ palette.replaceSColor(reinterpret_cast<uint32_t*>(&data[0]), 1);
EXPECT_EQ(0x10, data[0]);
EXPECT_EQ(0x50, data[1]);
EXPECT_EQ(0x60, data[2]);
@@ -170,7 +170,7 @@ TEST(Dye, replaceAColor1)
data[1] = 0x02;
data[2] = 0x03;
data[3] = 0x10;
- palette.replaceAColor(&data[0]);
+ palette.replaceAColor(reinterpret_cast<uint32_t*>(&data[0]), 1);
EXPECT_EQ(0x01, data[0]);
EXPECT_EQ(0x02, data[1]);
EXPECT_EQ(0x03, data[2]);
@@ -185,7 +185,7 @@ TEST(Dye, replaceAColor2)
data[1] = 0x00;
data[2] = 0xff;
data[3] = 0x00;
- palette.replaceAColor(&data[0]);
+ palette.replaceAColor(reinterpret_cast<uint32_t*>(&data[0]), 1);
EXPECT_EQ(0xff, data[0]);
EXPECT_EQ(0x11, data[1]);
EXPECT_EQ(0x00, data[2]);
@@ -200,7 +200,7 @@ TEST(Dye, replaceAColor3)
data[1] = 0xee;
data[2] = 0x00;
data[3] = 0x01;
- palette.replaceAColor(&data[0]);
+ palette.replaceAColor(reinterpret_cast<uint32_t*>(&data[0]), 1);
EXPECT_EQ(0xff, data[0]);
EXPECT_EQ(0x30, data[1]);
EXPECT_EQ(0x20, data[2]);