Commit 71806982 authored by Davis King's avatar Davis King

A few more minor changes to avoid problems with GCC 4.2.1

parent b59b8419
...@@ -708,7 +708,7 @@ namespace dlib ...@@ -708,7 +708,7 @@ namespace dlib
// add in the new right side of the rect and subtract the old right side. // add in the new right side of the rect and subtract the old right side.
cur_sum = cur_sum + column_sum[c+width] - column_sum[c]; cur_sum = cur_sum + column_sum[c+width] - column_sum[c];
out[r][c] += cur_sum; out[r][c] += static_cast<typename image_type2::type>(cur_sum);
} }
} }
} }
......
...@@ -175,7 +175,7 @@ namespace ...@@ -175,7 +175,7 @@ namespace
for (int i =0; i < 1000; ++i) for (int i =0; i < 1000; ++i)
{ {
DLIB_TEST(r.get_random_32bit_number() == r2.get_random_32bit_number()); DLIB_TEST(r.get_random_32bit_number() == r2.get_random_32bit_number());
DLIB_TEST(r.get_random_gaussian() == r2.get_random_gaussian()); DLIB_TEST(std::abs(r.get_random_gaussian() - r2.get_random_gaussian()) < 1e-15);
} }
} }
......
...@@ -407,7 +407,7 @@ namespace ...@@ -407,7 +407,7 @@ namespace
{ {
for (long c = 0; c < img.nc(); ++c) for (long c = 0; c < img.nc(); ++c)
{ {
img[r][c] = 100*(rnd.get_random_double()-0.5); img[r][c] = static_cast<pixel_type>(100*(rnd.get_random_double()-0.5));
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment