Beco: Difference between revisions
further simplifications
imported>Leoetlino No edit summary |
imported>Leoetlino (further simplifications) |
||
Line 143: | Line 143: | ||
uint row = std::clamp(z, 0, info->header->numRows - 2); | uint row = std::clamp(z, 0, info->header->numRows - 2); | ||
if (divisor == 10) | if (info->header->divisor == 10) | ||
x = x / 10 + ((0x66666667LL * x) >> 0x3F); | x = x / 10 + ((0x66666667LL * x) >> 0x3F); | ||
Line 157: | Line 157: | ||
totalLength += segment->length; | totalLength += segment->length; | ||
if (x < totalLength) | if (x < totalLength) | ||
return segment->value; | |||
++segment; | ++segment; | ||
if (segment >= segmentEnd) | if (segment >= segmentEnd) | ||
return 0xFFFFFFFF; | return 0xFFFFFFFF; | ||
} | } | ||
} | } | ||
</syntaxhighlight> | </syntaxhighlight> |