Skip to content

Commit b71e351

Browse files
committed
lint and build fix
Signed-off-by: Ian Chen <[email protected]>
1 parent 0e307e7 commit b71e351

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

graphics/src/Image.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#endif
2020
#include <FreeImage.h>
2121

22+
#include <cstdint>
2223
#include <cstring>
2324
#include <string>
2425

@@ -431,7 +432,7 @@ math::Color Image::Pixel(unsigned int _x, unsigned int _y) const
431432
if (_x >= this->Width() || _y >= this->Height())
432433
{
433434
gzerr << "Image: Coordinates out of range["
434-
<< _x << " " << _y << "] \n";
435+
<< _x << ", " << _y << "] \n";
435436
return clr;
436437
}
437438

@@ -443,7 +444,7 @@ math::Color Image::Pixel(unsigned int _x, unsigned int _y) const
443444
if (FreeImage_GetPixelColor(this->dataPtr->bitmap, _x, _y, &firgb) == FALSE)
444445
{
445446
gzerr << "Failed to get pixel value at ["
446-
<< _x << " " << _y << "] \n";
447+
<< _x << ", " << _y << "] \n";
447448
return clr;
448449
}
449450
clr.Set(firgb.rgbRed / 255.0f, firgb.rgbGreen / 255.0f,
@@ -455,7 +456,7 @@ math::Color Image::Pixel(unsigned int _x, unsigned int _y) const
455456
this->dataPtr->bitmap, _x, _y, clr) == FALSE)
456457
{
457458
gzerr << "Failed to get pixel value at ["
458-
<< _x << " " << _y << "] \n";
459+
<< _x << ", " << _y << "] \n";
459460
return clr;
460461
}
461462
}
@@ -520,7 +521,7 @@ BOOL Image::Implementation::PixelIndex(
520521
if (!_dib)
521522
return FALSE;
522523

523-
if (_x >= this->Width() || _y >= this->Height())
524+
if (_x >= FreeImage_GetWidth(_dib) || _y >= FreeImage_GetHeight(_dib))
524525
return FALSE;
525526

526527
// 8 bit images

graphics/src/Image_TEST.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*
1616
*/
1717
#include <fstream>
18+
#include <string>
1819

1920
#include <gtest/gtest.h>
2021

0 commit comments

Comments
 (0)