Skip to content

Commit 2d57465

Browse files
committed
int と uint の警告対策
1 parent 3aaaef1 commit 2d57465

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

modules/ximgproc/src/sparse_table_morphology.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,9 +158,9 @@ Mat SolveRSAPGreedy(const Mat& initialMap)
158158
int maxJ = 0;
159159
int maxX = 0;
160160
int maxY = 0;
161-
for (int i = 0; i < pos.size(); i++)
161+
for (uint i = 0; i < pos.size(); i++)
162162
{
163-
for (int j = i + 1; j < pos.size(); j++)
163+
for (uint j = i + 1; j < pos.size(); j++)
164164
{
165165
int _x = std::min(pos[i].x, pos[j].x);
166166
int _y = std::min(pos[i].y, pos[j].y);

modules/ximgproc/test/test_sparse_table_morphology.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ stMorph::kernelDecompInfo ftr_decomp(InputArray kernel)
192192
auto kdi = stMorph::decompKernel(kernel);
193193
Mat expected = kernel.getMat();
194194
Mat actual = Mat::zeros(kernel.size(), kernel.type());
195-
for (int r = 0; r < kdi.stRects.size(); r++)
195+
for (uint r = 0; r < kdi.stRects.size(); r++)
196196
{
197-
for (int c = 0; c < kdi.stRects[r].size(); c++)
197+
for (uint c = 0; c < kdi.stRects[r].size(); c++)
198198
{
199199
for (Point p : kdi.stRects[r][c])
200200
{
@@ -223,9 +223,9 @@ Mat VisualizeCovering(Mat& kernel, const stMorph::kernelDecompInfo& kdi)
223223
cv::line(kernel, Point(0, r * rate), Point(kdi.cols * rate, r * rate), Scalar(0));
224224
for (int c = 0; c < kdi.cols; c++)
225225
cv::line(kernel, Point(c * rate, 0), Point(c * rate, kdi.rows * rate), Scalar(0));
226-
for (int r = 0; r < kdi.stRects.size(); r++)
226+
for (uint r = 0; r < kdi.stRects.size(); r++)
227227
{
228-
for (int c = 0; c < kdi.stRects[r].size(); c++)
228+
for (uint c = 0; c < kdi.stRects[r].size(); c++)
229229
{
230230
Size s(1 << c, 1 << r);
231231
for (Point p : kdi.stRects[r][c])

0 commit comments

Comments
 (0)