[PR #33] [MERGED] Fix encoder compilation error on MSVS 2010. #612

Open
opened 2026-01-29 20:46:25 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/google/brotli/pull/33
Author: @szabadka
Created: 2/27/2015
Status: Merged
Merged: 2/27/2015
Merged by: @szabadka

Base: masterHead: master


📝 Commits (1)

  • fab601e Fix encoder compilation error on MSVS 2010.

📊 Changes

2 files changed (+10 additions, -2 deletions)

View changed files

📝 enc/fast_log.h (+7 -0)
📝 enc/literal_cost.cc (+3 -2)

📄 Description

As reported by @anthrotype, log2() is missing from MSVS 2010.
This patch uses log() and a multiplication in FastLog2()
for _MSV_VER <= 1600 and uses FastLog2() in literal_cost.cc
instead of log2().


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/google/brotli/pull/33 **Author:** [@szabadka](https://github.com/szabadka) **Created:** 2/27/2015 **Status:** ✅ Merged **Merged:** 2/27/2015 **Merged by:** [@szabadka](https://github.com/szabadka) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`fab601e`](https://github.com/google/brotli/commit/fab601e81fd464342d7c31736a5bc7ad413bce63) Fix encoder compilation error on MSVS 2010. ### 📊 Changes **2 files changed** (+10 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `enc/fast_log.h` (+7 -0) 📝 `enc/literal_cost.cc` (+3 -2) </details> ### 📄 Description As reported by @anthrotype, log2() is missing from MSVS 2010. This patch uses log() and a multiplication in FastLog2() for _MSV_VER <= 1600 and uses FastLog2() in literal_cost.cc instead of log2(). --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 20:46:25 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#612