Skip to content

Commit 71f78c1

Browse files
committed
Fixed compiler warnings
1 parent 88c1bf3 commit 71f78c1

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

dlib/image_transforms/image_pyramid.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ namespace dlib
10451045

10461046
long y = outer_padding;
10471047
size_t i = 0;
1048-
while(y < height+outer_padding)
1048+
while(y < height+(long)outer_padding)
10491049
{
10501050
rectangle rect = translate_rect(get_rect(pyramid[i]),point(outer_padding,y));
10511051
DLIB_ASSERT(get_rect(out_img).contains(rect));

dlib/image_transforms/interpolation.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,7 +1306,8 @@ namespace dlib
13061306
pyramid_type pyr;
13071307
for (unsigned long i = 0; i < images.size(); ++i)
13081308
{
1309-
if (images[i].size() <= max_image_size)
1309+
const unsigned long img_size = num_rows(images[i])*num_columns(images[i]);
1310+
if (img_size <= max_image_size)
13101311
{
13111312
pyramid_up(images[i], temp, pyr);
13121313
swap(temp, images[i]);
@@ -1340,7 +1341,8 @@ namespace dlib
13401341
pyramid_type pyr;
13411342
for (unsigned long i = 0; i < images.size(); ++i)
13421343
{
1343-
if (images[i].size() <= max_image_size)
1344+
const unsigned long img_size = num_rows(images[i])*num_columns(images[i]);
1345+
if (img_size <= max_image_size)
13441346
{
13451347
pyramid_up(images[i], temp, pyr);
13461348
swap(temp, images[i]);
@@ -1377,7 +1379,8 @@ namespace dlib
13771379
pyramid_type pyr;
13781380
for (unsigned long i = 0; i < images.size(); ++i)
13791381
{
1380-
if (images[i].size() <= max_image_size)
1382+
const unsigned long img_size = num_rows(images[i])*num_columns(images[i]);
1383+
if (img_size <= max_image_size)
13811384
{
13821385
pyramid_up(images[i], temp, pyr);
13831386
swap(temp, images[i]);

0 commit comments

Comments
 (0)