mirror of https://github.com/davisking/dlib.git
Fixing yet more compiler warnings on older versions of gcc
This commit is contained in:
parent
2021d6ed24
commit
4e8bcd2526
|
@ -483,8 +483,8 @@ namespace dlib
|
||||||
if (set1 != set2)
|
if (set1 != set2)
|
||||||
{
|
{
|
||||||
const diff_type diff = sorted_edges[i].diff;
|
const diff_type diff = sorted_edges[i].diff;
|
||||||
const diff_type tau1 = k/data[set1].component_size;
|
const diff_type tau1 = static_cast<diff_type>(k/data[set1].component_size);
|
||||||
const diff_type tau2 = k/data[set2].component_size;
|
const diff_type tau2 = static_cast<diff_type>(k/data[set2].component_size);
|
||||||
|
|
||||||
const diff_type mint = std::min(data[set1].internal_diff + tau1,
|
const diff_type mint = std::min(data[set1].internal_diff + tau1,
|
||||||
data[set2].internal_diff + tau2);
|
data[set2].internal_diff + tau2);
|
||||||
|
|
|
@ -258,7 +258,9 @@ namespace
|
||||||
{
|
{
|
||||||
for (long c = 0; c < images[i].nc(); ++c)
|
for (long c = 0; c < images[i].nc(); ++c)
|
||||||
{
|
{
|
||||||
images[i][r][c] = put_in_range(0,255,images[i][r][c] + 10*rnd.get_random_gaussian());
|
typedef typename image_array_type::type image_type;
|
||||||
|
typedef typename image_type::type type;
|
||||||
|
images[i][r][c] = (type)put_in_range(0,255,images[i][r][c] + 10*rnd.get_random_gaussian());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -356,7 +358,9 @@ namespace
|
||||||
{
|
{
|
||||||
for (long c = 0; c < images[i].nc(); ++c)
|
for (long c = 0; c < images[i].nc(); ++c)
|
||||||
{
|
{
|
||||||
images[i][r][c] = put_in_range(0,255,images[i][r][c] + 40*rnd.get_random_gaussian());
|
typedef typename image_array_type::type image_type;
|
||||||
|
typedef typename image_type::type type;
|
||||||
|
images[i][r][c] = (type)put_in_range(0,255,images[i][r][c] + 40*rnd.get_random_gaussian());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue