Skip to content

Commit

Permalink
error checking 4
Browse files Browse the repository at this point in the history
signedness
  • Loading branch information
GDBobby committed Sep 24, 2023
1 parent b58a51e commit 43844fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/HistogramBitmap/HistogramBitmap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class HistogramBitmap {
interpolatedHeight[0] = heightValues[0];
interpolatedHeight.back() = heightValues.back();

for(int i = 1; i < imageSize - 1; i++) {
for(uint16_t i = 1; i < imageSize - 1; i++) {
float exactPoint = static_cast<float>(i) / stepSizeOfBaseGraph;
uint16_t lastPoint = static_cast<uint16_t>(std::floor(exactPoint));
uint16_t nextPoint = static_cast<uint16_t>(std::ceil(exactPoint));
Expand All @@ -187,8 +187,8 @@ class HistogramBitmap {
}

writeBitmapFileHeader(imageSize, outFile);
for(int y = 0; y < imageSize; y++) {
for(int x = 0; x < imageSize; x++) {
for(uint16_t y = 0; y < imageSize; y++) {
for(uint16_t x = 0; x < imageSize; x++) {
if(interpolatedHeight.at(x) >= (float)y) {
histogramColor.writeToFile(outFile);
}
Expand Down

0 comments on commit 43844fb

Please sign in to comment.