Skip to content

Commit

Permalink
Compare int and unsigned int
Browse files Browse the repository at this point in the history
  • Loading branch information
ggrzeczkowicz committed Oct 27, 2024
1 parent 753749c commit d210c17
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions main_edge_collapse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,7 @@ int main(int argc, char **argv) {
assert(has_point_int_label);
for (auto ph: point_cloud) {
int value = int_label[ph];
if (value >= LABELS.size()) value = LABEL_OTHER;
if (value < 0) value = LABEL_OTHER;
if (value < 0 || ((unsigned int) value) >= LABELS.size()) value = LABEL_OTHER;
point_cloud_label[ph] = static_cast<unsigned char>(value);
}
std::cout << "Point cloud label from int_label property" << std::endl;
Expand Down

0 comments on commit d210c17

Please sign in to comment.