mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-09-09 04:54:33 +00:00
look for log2() without std namespace
This commit is contained in:
parent
46c4e5cb41
commit
dbe31570d0
@ -298,7 +298,7 @@ bool OpenTypeSILF::SILSub::ParsePart(Buffer& table) {
|
|||||||
this->searchPseudo = this->pseudoSelector = this->pseudoShift = 0;
|
this->searchPseudo = this->pseudoSelector = this->pseudoShift = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
unsigned floorLog2 = std::floor(std::log2(this->numPseudo));
|
unsigned floorLog2 = std::floor(log2(this->numPseudo));
|
||||||
if (this->searchPseudo != 6 * (unsigned)std::pow(2, floorLog2) ||
|
if (this->searchPseudo != 6 * (unsigned)std::pow(2, floorLog2) ||
|
||||||
this->pseudoSelector != floorLog2 ||
|
this->pseudoSelector != floorLog2 ||
|
||||||
this->pseudoShift != 6 * this->numPseudo - this->searchPseudo) {
|
this->pseudoShift != 6 * this->numPseudo - this->searchPseudo) {
|
||||||
@ -565,7 +565,7 @@ LookupClass::ParsePart(Buffer& table) {
|
|||||||
this->searchRange = this->entrySelector = this->rangeShift = 0;
|
this->searchRange = this->entrySelector = this->rangeShift = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
unsigned floorLog2 = std::floor(std::log2(this->numIDs));
|
unsigned floorLog2 = std::floor(log2(this->numIDs));
|
||||||
if (this->searchRange != (unsigned)std::pow(2, floorLog2) ||
|
if (this->searchRange != (unsigned)std::pow(2, floorLog2) ||
|
||||||
this->entrySelector != floorLog2 ||
|
this->entrySelector != floorLog2 ||
|
||||||
this->rangeShift != this->numIDs - this->searchRange) {
|
this->rangeShift != this->numIDs - this->searchRange) {
|
||||||
@ -694,7 +694,7 @@ SILPass::ParsePart(Buffer& table, const size_t SILSub_init_offset,
|
|||||||
this->searchRange = this->entrySelector = this->rangeShift = 0;
|
this->searchRange = this->entrySelector = this->rangeShift = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
unsigned floorLog2 = std::floor(std::log2(this->numRange));
|
unsigned floorLog2 = std::floor(log2(this->numRange));
|
||||||
if (this->searchRange != 6 * (unsigned)std::pow(2, floorLog2) ||
|
if (this->searchRange != 6 * (unsigned)std::pow(2, floorLog2) ||
|
||||||
this->entrySelector != floorLog2 ||
|
this->entrySelector != floorLog2 ||
|
||||||
this->rangeShift != 6 * this->numRange - this->searchRange) {
|
this->rangeShift != 6 * this->numRange - this->searchRange) {
|
||||||
|
@ -35,7 +35,7 @@ bool OpenTypeSILL::Parse(const uint8_t* data, size_t length) {
|
|||||||
this->searchRange = this->entrySelector = this->rangeShift = 0;
|
this->searchRange = this->entrySelector = this->rangeShift = 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
unsigned floorLog2 = std::floor(std::log2(this->numLangs));
|
unsigned floorLog2 = std::floor(log2(this->numLangs));
|
||||||
if (this->searchRange != (unsigned)std::pow(2, floorLog2) ||
|
if (this->searchRange != (unsigned)std::pow(2, floorLog2) ||
|
||||||
this->entrySelector != floorLog2 ||
|
this->entrySelector != floorLog2 ||
|
||||||
this->rangeShift != this->numLangs - this->searchRange) {
|
this->rangeShift != this->numLangs - this->searchRange) {
|
||||||
|
Loading…
Reference in New Issue
Block a user