From d84e2cc97fdf6e1e166cdf11c7075e8a9257cf4b Mon Sep 17 00:00:00 2001 From: Peter Klotz Date: Wed, 9 Dec 2020 12:13:21 +0100 Subject: [PATCH] Fixed Windows compiler warnings --- src/facedetectcnn.cpp | 6 +++--- src/facedetectcnn.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/facedetectcnn.cpp b/src/facedetectcnn.cpp index 34ec6be28..8f0082845 100644 --- a/src/facedetectcnn.cpp +++ b/src/facedetectcnn.cpp @@ -871,8 +871,8 @@ bool detection_output(const CDataBlob * priorbox, float cls_score = pConf[i + 1]; int face_idx = i / 2; float iou_score = pIoU[face_idx]; - float conf = sqrtf(cls_score * iou_score); - if(conf > confidence_threshold) + float confidence = sqrtf(cls_score * iou_score); + if(confidence > confidence_threshold) { float fBox_x1 = pPriorBox[face_idx * 4]; float fBox_y1 = pPriorBox[face_idx * 4 + 1]; @@ -920,7 +920,7 @@ bool detection_output(const CDataBlob * priorbox, bb.lm[i * 2 + 1] = lmy; } - score_bbox_vec.push_back(std::make_pair(conf, bb)); + score_bbox_vec.push_back(std::make_pair(confidence, bb)); } } diff --git a/src/facedetectcnn.h b/src/facedetectcnn.h index 93dfb7907..fdb0267d5 100644 --- a/src/facedetectcnn.h +++ b/src/facedetectcnn.h @@ -206,10 +206,10 @@ class CDataBlob //#endif for (int r = 0; r < this->height; r++) { - for (int c = 0; c < this->width; c++) + for (int col = 0; col < this->width; col++) { int pixel_end = this->channelStep / sizeof(T); - T * pI = (this->data + (size_t(r) * this->width + c) * this->channelStep /sizeof(T)); + T * pI = (this->data + (size_t(r) * this->width + col) * this->channelStep /sizeof(T)); for (int ch = this->channels; ch < pixel_end; ch++) pI[ch] = 0; } @@ -218,7 +218,7 @@ class CDataBlob return true; } - bool setInt8FilterData(signed char * pData, int bias, int dataWidth, int dataHeight, int dataChannels) + bool setInt8FilterData(signed char * pData, int dataBias, int dataWidth, int dataHeight, int dataChannels) { if (pData == NULL) { @@ -250,7 +250,7 @@ class CDataBlob } } - this->bias = bias; + this->bias = dataBias; return true; }