Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Fixed comparison with different signedness
Browse files Browse the repository at this point in the history
  • Loading branch information
ariostas committed Apr 15, 2024
1 parent bedbfef commit 9748335
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions SDL/Event.cc
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ void SDL::Event<SDL::Acc>::createPixelTriplets() {
for (unsigned int i = 0; i < nInnerSegments; i++) { // loop over # pLS
int8_t pixelType = pixelTypes[i]; // Get pixel type for this pLS
int superbin = superbins[i]; // Get superbin for this pixel
if ((superbin < 0) or (superbin >= size_superbins) or (pixelType > 2) or (pixelType < 0)) {
if ((superbin < 0) or (superbin >= (int)size_superbins) or (pixelType > 2) or (pixelType < 0)) {
connectedPixelSize_host[i] = 0;
connectedPixelIndex_host[i] = 0;
continue;
Expand Down Expand Up @@ -1096,7 +1096,7 @@ void SDL::Event<SDL::Acc>::createPixelQuintuplets() {
for (unsigned int i = 0; i < nInnerSegments; i++) {
int8_t pixelType = pixelTypes[i]; // Get pixel type for this pLS
int superbin = superbins[i]; // Get superbin for this pixel
if ((superbin < 0) or (superbin >= size_superbins) or (pixelType > 2) or (pixelType < 0)) {
if ((superbin < 0) or (superbin >= (int)size_superbins) or (pixelType > 2) or (pixelType < 0)) {
connectedPixelIndex_host[i] = 0;
connectedPixelSize_host[i] = 0;
continue;
Expand Down

0 comments on commit 9748335

Please sign in to comment.