mirror of
https://github.com/google/brotli.git
synced 2024-11-22 11:40:06 +00:00
Fix compilation with VS2012
This commit is contained in:
parent
510131d1db
commit
d9a268c60c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user