mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 03:00:38 +00:00
imo auto is cleaner here because the cast of the rvalue makes the resulting type explicitly clear
git-svn-id: https://svn.eduke32.com/eduke32@7089 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
bac01d8e2a
commit
4c57c4dd46
1 changed files with 14 additions and 14 deletions
|
@ -249,7 +249,7 @@ void clearbufbyte(void *d, int32_t c, int32_t a)
|
||||||
#ifndef pragmas_have_qinterpolatedown16
|
#ifndef pragmas_have_qinterpolatedown16
|
||||||
void qinterpolatedown16(intptr_t bufptr, int32_t num, int32_t val, int32_t add)
|
void qinterpolatedown16(intptr_t bufptr, int32_t num, int32_t val, int32_t add)
|
||||||
{
|
{
|
||||||
int32_t *lptr = (int32_t *)bufptr;
|
auto lptr = (int32_t *)bufptr;
|
||||||
for (size_t i = 0, i_end = num; i < i_end; ++i)
|
for (size_t i = 0, i_end = num; i < i_end; ++i)
|
||||||
{
|
{
|
||||||
lptr[i] = val>>16;
|
lptr[i] = val>>16;
|
||||||
|
@ -259,7 +259,7 @@ void qinterpolatedown16(intptr_t bufptr, int32_t num, int32_t val, int32_t add)
|
||||||
|
|
||||||
void qinterpolatedown16short(intptr_t bufptr, int32_t num, int32_t val, int32_t add)
|
void qinterpolatedown16short(intptr_t bufptr, int32_t num, int32_t val, int32_t add)
|
||||||
{
|
{
|
||||||
int16_t *sptr = (int16_t *)bufptr;
|
auto sptr = (int16_t *)bufptr;
|
||||||
for (size_t i = 0, i_end = num; i < i_end; ++i)
|
for (size_t i = 0, i_end = num; i < i_end; ++i)
|
||||||
{
|
{
|
||||||
sptr[i] = val>>16;
|
sptr[i] = val>>16;
|
||||||
|
@ -271,7 +271,7 @@ void qinterpolatedown16short(intptr_t bufptr, int32_t num, int32_t val, int32_t
|
||||||
#ifndef pragmas_have_clearbuf
|
#ifndef pragmas_have_clearbuf
|
||||||
void clearbuf(void *d, int32_t c, int32_t a)
|
void clearbuf(void *d, int32_t c, int32_t a)
|
||||||
{
|
{
|
||||||
int32_t *p = (int32_t *)d;
|
auto p = (int32_t *)d;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (a == 0)
|
if (a == 0)
|
||||||
|
@ -289,8 +289,8 @@ void clearbuf(void *d, int32_t c, int32_t a)
|
||||||
#ifndef pragmas_have_copybuf
|
#ifndef pragmas_have_copybuf
|
||||||
void copybuf(const void *s, void *d, int32_t c)
|
void copybuf(const void *s, void *d, int32_t c)
|
||||||
{
|
{
|
||||||
const int32_t *p = (const int32_t *)s;
|
auto p = (const int32_t *) s;
|
||||||
int32_t *q = (int32_t *)d;
|
auto q = (int32_t *) d;
|
||||||
|
|
||||||
while (c--)
|
while (c--)
|
||||||
*q++ = *p++;
|
*q++ = *p++;
|
||||||
|
@ -300,12 +300,12 @@ void copybuf(const void *s, void *d, int32_t c)
|
||||||
#ifndef pragmas_have_swaps
|
#ifndef pragmas_have_swaps
|
||||||
void swapbuf4(void *a, void *b, int32_t c)
|
void swapbuf4(void *a, void *b, int32_t c)
|
||||||
{
|
{
|
||||||
int32_t *p = (int32_t *)a, *q = (int32_t *)b;
|
auto p = (int32_t *) a;
|
||||||
int32_t x, y;
|
auto q = (int32_t *) b;
|
||||||
|
|
||||||
while ((c--) > 0)
|
while ((c--) > 0)
|
||||||
{
|
{
|
||||||
x = *q;
|
int x = *q, y = *p;
|
||||||
y = *p;
|
|
||||||
*(q++) = y;
|
*(q++) = y;
|
||||||
*(p++) = x;
|
*(p++) = x;
|
||||||
}
|
}
|
||||||
|
@ -318,7 +318,7 @@ void clearbufbyte(void *D, int32_t c, int32_t a)
|
||||||
// Cringe City
|
// Cringe City
|
||||||
int32_t const m[4] = { 0xffl, 0xff00l, 0xff0000l, (int32_t)0xff000000l };
|
int32_t const m[4] = { 0xffl, 0xff00l, 0xff0000l, (int32_t)0xff000000l };
|
||||||
int32_t z = 0;
|
int32_t z = 0;
|
||||||
char *p = (char *)D;
|
auto p = (char *)D;
|
||||||
|
|
||||||
while ((c--) > 0)
|
while ((c--) > 0)
|
||||||
{
|
{
|
||||||
|
@ -331,8 +331,8 @@ void clearbufbyte(void *D, int32_t c, int32_t a)
|
||||||
#ifndef pragmas_have_copybufbyte
|
#ifndef pragmas_have_copybufbyte
|
||||||
void copybufbyte(const void *s, void *d, int32_t c)
|
void copybufbyte(const void *s, void *d, int32_t c)
|
||||||
{
|
{
|
||||||
const char *src = (const char *)s;
|
auto src = (const char *)s;
|
||||||
char *dst = (char *)d;
|
auto dst = (char *)d;
|
||||||
|
|
||||||
while (c--)
|
while (c--)
|
||||||
*dst++ = *src++;
|
*dst++ = *src++;
|
||||||
|
@ -385,8 +385,8 @@ void copybufreverse(const void *S, void *D, int32_t c)
|
||||||
#elif !defined pragmas_have_copybufreverse
|
#elif !defined pragmas_have_copybufreverse
|
||||||
void copybufreverse(const void *s, void *d, int32_t c)
|
void copybufreverse(const void *s, void *d, int32_t c)
|
||||||
{
|
{
|
||||||
const char *src = (const char *)s;
|
auto src = (const char *)s;
|
||||||
char *dst = (char *)d;
|
auto dst = (char *)d;
|
||||||
|
|
||||||
while (c--)
|
while (c--)
|
||||||
*dst++ = *src--;
|
*dst++ = *src--;
|
||||||
|
|
Loading…
Reference in a new issue