mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 13:08:47 +02:00
Declaration and assignment can be joined, Member function may be 'const'. (#2875)
This commit is contained in:
@ -1752,7 +1752,7 @@ int ImFontAtlas::AddCustomRectFontGlyph(ImFont* font, ImWchar id, int width, int
|
||||
return CustomRects.Size - 1; // Return index
|
||||
}
|
||||
|
||||
void ImFontAtlas::CalcCustomRectUV(const ImFontAtlasCustomRect* rect, ImVec2* out_uv_min, ImVec2* out_uv_max)
|
||||
void ImFontAtlas::CalcCustomRectUV(const ImFontAtlasCustomRect* rect, ImVec2* out_uv_min, ImVec2* out_uv_max) const
|
||||
{
|
||||
IM_ASSERT(TexWidth > 0 && TexHeight > 0); // Font atlas needs to be built before we can calculate UV coordinates
|
||||
IM_ASSERT(rect->IsPacked()); // Make sure the rectangle has been packed
|
||||
@ -3201,9 +3201,9 @@ static unsigned int stb_adler32(unsigned int adler32, unsigned char *buffer, uns
|
||||
{
|
||||
const unsigned long ADLER_MOD = 65521;
|
||||
unsigned long s1 = adler32 & 0xffff, s2 = adler32 >> 16;
|
||||
unsigned long blocklen, i;
|
||||
unsigned long blocklen = buflen % 5552;
|
||||
|
||||
blocklen = buflen % 5552;
|
||||
unsigned long i;
|
||||
while (buflen) {
|
||||
for (i=0; i + 7 < blocklen; i += 8) {
|
||||
s1 += buffer[0], s2 += s1;
|
||||
@ -3230,10 +3230,9 @@ static unsigned int stb_adler32(unsigned int adler32, unsigned char *buffer, uns
|
||||
|
||||
static unsigned int stb_decompress(unsigned char *output, const unsigned char *i, unsigned int /*length*/)
|
||||
{
|
||||
unsigned int olen;
|
||||
if (stb__in4(0) != 0x57bC0000) return 0;
|
||||
if (stb__in4(4) != 0) return 0; // error! stream is > 4GB
|
||||
olen = stb_decompress_length(i);
|
||||
const unsigned int olen = stb_decompress_length(i);
|
||||
stb__barrier_in_b = i;
|
||||
stb__barrier_out_e = output + olen;
|
||||
stb__barrier_out_b = output;
|
||||
|
Reference in New Issue
Block a user