Skip to content

Commit

Permalink
WriteBarcode: fix MSVC compiler warning
Browse files Browse the repository at this point in the history
  • Loading branch information
axxel committed Mar 21, 2024
1 parent 04f3246 commit fc672a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/WriteBarcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,8 @@ std::string WriteBarcodeToUtf8(const Barcode& barcode, [[maybe_unused]] const Wr

for (int y = 0; y < iv.height(); y += 2) {
for (int x = 0; x < iv.width(); ++x) {
int tp = *iv.data(x, y) ^ inverted;
int bt = (iv.height() == 1 && tp) || (y + 1 < iv.height() && (*iv.data(x, y) ^ inverted));
int tp = bool(*iv.data(x, y)) ^ inverted;
int bt = (iv.height() == 1 && tp) || (y + 1 < iv.height() && (bool(*iv.data(x, y)) ^ inverted));
res << map[tp | (bt << 1)];
}
res << '\n';
Expand Down

0 comments on commit fc672a5

Please sign in to comment.