Mercurial > hg > orthanc
comparison UnitTestsSources/ImageTests.cpp @ 1654:3727a09e7b53
fix some icc warnings
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 28 Sep 2015 15:03:35 +0200 |
parents | 96582230ddcb |
children | b1291df2f780 |
comparison
equal
deleted
inserted
replaced
1653:0c86b30bb8b2 | 1654:3727a09e7b53 |
---|---|
48 | 48 |
49 | 49 |
50 TEST(PngWriter, ColorPattern) | 50 TEST(PngWriter, ColorPattern) |
51 { | 51 { |
52 Orthanc::PngWriter w; | 52 Orthanc::PngWriter w; |
53 int width = 17; | 53 unsigned int width = 17; |
54 int height = 61; | 54 unsigned int height = 61; |
55 int pitch = width * 3; | 55 unsigned int pitch = width * 3; |
56 | 56 |
57 std::vector<uint8_t> image(height * pitch); | 57 std::vector<uint8_t> image(height * pitch); |
58 for (int y = 0; y < height; y++) | 58 for (unsigned int y = 0; y < height; y++) |
59 { | 59 { |
60 uint8_t *p = &image[0] + y * pitch; | 60 uint8_t *p = &image[0] + y * pitch; |
61 for (int x = 0; x < width; x++, p += 3) | 61 for (unsigned int x = 0; x < width; x++, p += 3) |
62 { | 62 { |
63 p[0] = (y % 3 == 0) ? 255 : 0; | 63 p[0] = (y % 3 == 0) ? 255 : 0; |
64 p[1] = (y % 3 == 1) ? 255 : 0; | 64 p[1] = (y % 3 == 1) ? 255 : 0; |
65 p[2] = (y % 3 == 2) ? 255 : 0; | 65 p[2] = (y % 3 == 2) ? 255 : 0; |
66 } | 66 } |