Fix compilation with VS2012

This commit is contained in:
Frank Aurich 2016-04-22 10:55:31 +02:00
parent 510131d1db
commit d9a268c60c

View File

@ -124,8 +124,8 @@ static inline double FastLog2(size_t v) {
if (v < sizeof(kLog2Table) / sizeof(kLog2Table[0])) {
return kLog2Table[v];
}
#if defined(_MSC_VER) && _MSC_VER <= 1600
// Visual Studio 2010 does not have the log2() function defined, so we use
#if defined(_MSC_VER) && _MSC_VER <= 1700
// Visual Studio 2012 does not have the log2() function defined, so we use
// log() and a multiplication instead.
static const double kLog2Inv = 1.4426950408889634f;
return log(static_cast<double>(v)) * kLog2Inv;