mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-22 20:07:01 +00:00
Missing tidying up (#358)
This commit is contained in:
parent
48bb3c8026
commit
edf730b672
@ -1081,13 +1081,12 @@ static const char* GetDefaultCompressedFontDataTTFBase85();
|
|||||||
static unsigned int Decode85Byte(char c) { return c >= '\\' ? c-36 : c-35; }
|
static unsigned int Decode85Byte(char c) { return c >= '\\' ? c-36 : c-35; }
|
||||||
static void Decode85(const unsigned char* src, unsigned char* dst)
|
static void Decode85(const unsigned char* src, unsigned char* dst)
|
||||||
{
|
{
|
||||||
for (; *src; src += 5)
|
while (*src)
|
||||||
{
|
{
|
||||||
unsigned int tmp = Decode85Byte(src[0]) + 85*(Decode85Byte(src[1]) + 85*(Decode85Byte(src[2]) + 85*(Decode85Byte(src[3]) + 85*Decode85Byte(src[4]))));
|
unsigned int tmp = Decode85Byte(src[0]) + 85*(Decode85Byte(src[1]) + 85*(Decode85Byte(src[2]) + 85*(Decode85Byte(src[3]) + 85*Decode85Byte(src[4]))));
|
||||||
*dst++ = ((tmp >> 0) & 0xFF);
|
dst[0] = ((tmp >> 0) & 0xFF); dst[1] = ((tmp >> 8) & 0xFF); dst[2] = ((tmp >> 16) & 0xFF); dst[3] = ((tmp >> 24) & 0xFF); // We can't assume little-endianess.
|
||||||
*dst++ = ((tmp >> 8) & 0xFF);
|
src += 5;
|
||||||
*dst++ = ((tmp >> 16) & 0xFF);
|
dst += 4;
|
||||||
*dst++ = ((tmp >> 24) & 0xFF);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user