Changed to avoid compiler error in visual studio 2005

This commit is contained in:
Davis King 2011-12-27 08:56:02 -05:00
parent e4cd58aae5
commit 419eebc81b
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ namespace dlib
// figure out what the offset values should be
for (int itr = 0; itr < offset.size(); ++itr)
{
counts.assign(std::pow(2,bits), 0);
counts.assign(std::pow(2.0,bits), 0);
// count the popularity of each hash value
for (unsigned long i = 0; i < h.size(); ++i)
{

View File

@ -44,7 +44,7 @@ namespace dlib
unsigned long num_hash_bins (
) const
{
return static_cast<unsigned long>(std::pow(2, offset.size()));
return static_cast<unsigned long>(std::pow(2.0, offset.size()));
}
template <typename EXP>