fix cppcheck error about lo_x. Inner scope overwriting it.

This commit is contained in:
Isaac Connor 2022-01-10 17:36:45 -05:00
parent 376d7fd7e5
commit 3f7b9dfff7
1 changed files with 2 additions and 1 deletions

View File

@ -219,7 +219,7 @@ bool Zone::CheckAlarms(const Image *delta_image) {
int alarm_mid_x = -1; int alarm_mid_x = -1;
int alarm_mid_y = -1; int alarm_mid_y = -1;
unsigned int lo_x = polygon.Extent().Lo().x_; //unsigned int lo_x = polygon.Extent().Lo().x_;
unsigned int lo_y = polygon.Extent().Lo().y_; unsigned int lo_y = polygon.Extent().Lo().y_;
unsigned int hi_x = polygon.Extent().Hi().x_; unsigned int hi_x = polygon.Extent().Hi().x_;
unsigned int hi_y = polygon.Extent().Hi().y_; unsigned int hi_y = polygon.Extent().Hi().y_;
@ -699,6 +699,7 @@ bool Zone::CheckAlarms(const Image *delta_image) {
if ((type < PRECLUSIVE) && (check_method >= BLOBS) && (monitor->GetOptSaveJPEGs() > 1)) { if ((type < PRECLUSIVE) && (check_method >= BLOBS) && (monitor->GetOptSaveJPEGs() > 1)) {
unsigned int lo_x = polygon.Extent().Lo().x_;
// First mask out anything we don't want // First mask out anything we don't want
for (unsigned int y = lo_y; y <= hi_y; y++) { for (unsigned int y = lo_y; y <= hi_y; y++) {
pdiff = diff_buff + ((diff_width * y) + lo_x); pdiff = diff_buff + ((diff_width * y) + lo_x);