Skip to content

Commit 408c1ae

Browse files
authored
Apply suggestions from code review
1 parent 787189c commit 408c1ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-native-executorch/common/rnexecutorch/data_processing/ImageProcessing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ std::vector<float> convertColorMatToVector(const cv::Mat &mat) {
2323

2424
std::vector<float> convertColorMatToVector(const cv::Mat &mat, cv::Scalar mean,
2525
cv::Scalar variance) {
26-
constexpr auto numChannels = 3;
26+
constexpr size_t numChannels = 3;
2727
constexpr auto maxPixelValueFloat = 255.0F;
2828

2929
int pixelCount = mat.cols * mat.rows;
3030
std::vector<float> v(pixelCount * numChannels, 0.0F);
3131

3232
// rescale to pixels values in matrix
3333
#pragma unroll
34-
for (int i = 0; i < numChannels; ++i) {
34+
for (size_t i = 0; i < numChannels; ++i) {
3535
mean[i] *= maxPixelValueFloat;
3636
variance[i] *= maxPixelValueFloat;
3737
}

0 commit comments

Comments
 (0)