forked from enlightenment/efl
draw: silence warning in a tricky loop/switch statement.
This commit is contained in:
parent
7caa81ed9d
commit
3fadc0d5af
|
@ -98,16 +98,26 @@ draw_memset32(uint32_t *dest, uint32_t value, int length)
|
||||||
if (length <= 0)
|
if (length <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// Cute hack to align future memcopy operation
|
||||||
|
// and do unroll the loop a bit. Not sure it is
|
||||||
|
// the most efficient, but will do for now.
|
||||||
n = (length + 7) / 8;
|
n = (length + 7) / 8;
|
||||||
switch (length & 0x07)
|
switch (length & 0x07)
|
||||||
{
|
{
|
||||||
case 0: do { *dest++ = value;
|
case 0: do { *dest++ = value;
|
||||||
|
EINA_FALLTHROUGH;
|
||||||
case 7: *dest++ = value;
|
case 7: *dest++ = value;
|
||||||
|
EINA_FALLTHROUGH;
|
||||||
case 6: *dest++ = value;
|
case 6: *dest++ = value;
|
||||||
|
EINA_FALLTHROUGH;
|
||||||
case 5: *dest++ = value;
|
case 5: *dest++ = value;
|
||||||
|
EINA_FALLTHROUGH;
|
||||||
case 4: *dest++ = value;
|
case 4: *dest++ = value;
|
||||||
|
EINA_FALLTHROUGH;
|
||||||
case 3: *dest++ = value;
|
case 3: *dest++ = value;
|
||||||
|
EINA_FALLTHROUGH;
|
||||||
case 2: *dest++ = value;
|
case 2: *dest++ = value;
|
||||||
|
EINA_FALLTHROUGH;
|
||||||
case 1: *dest++ = value;
|
case 1: *dest++ = value;
|
||||||
} while (--n > 0);
|
} while (--n > 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue