mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 03:00:38 +00:00
Some [U]INT_MAX --> [U]INT32_MAX.
git-svn-id: https://svn.eduke32.com/eduke32@2986 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7f74880c96
commit
52bb35361b
4 changed files with 10 additions and 10 deletions
|
@ -2269,8 +2269,8 @@ static inline int32_t boundmulscale(int32_t a, int32_t d, int32_t c)
|
||||||
{ // courtesy of Ken
|
{ // courtesy of Ken
|
||||||
int64_t p;
|
int64_t p;
|
||||||
p = (((int64_t)a)*((int64_t)d))>>c;
|
p = (((int64_t)a)*((int64_t)d))>>c;
|
||||||
if (p >= INT_MAX) p = INT_MAX;
|
if (p >= INT32_MAX) p = INT32_MAX;
|
||||||
if (p < INT_MIN) p = INT_MIN;
|
if (p < INT32_MIN) p = INT32_MIN;
|
||||||
return((int32_t)p);
|
return((int32_t)p);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3240,7 +3240,7 @@ void overheadeditor(void)
|
||||||
if (zoom >= 768)
|
if (zoom >= 768)
|
||||||
{
|
{
|
||||||
int32_t alwaysshowgray =
|
int32_t alwaysshowgray =
|
||||||
(showinnergray || !(editorzrange[0]==INT32_MIN && editorzrange[1]==INT_MAX));
|
(showinnergray || !(editorzrange[0]==INT32_MIN && editorzrange[1]==INT32_MAX));
|
||||||
|
|
||||||
for (i=0, k=0; (m32_sideview && k<m32_swcnt) || (!m32_sideview && i<MAXSPRITES); i++, k++)
|
for (i=0, k=0; (m32_sideview && k<m32_swcnt) || (!m32_sideview && i<MAXSPRITES); i++, k++)
|
||||||
{
|
{
|
||||||
|
@ -7919,7 +7919,7 @@ int32_t getpointhighlight(int32_t xplc, int32_t yplc, int32_t point)
|
||||||
{
|
{
|
||||||
int32_t i, j, dst, dist = 512, closest = -1;
|
int32_t i, j, dst, dist = 512, closest = -1;
|
||||||
int32_t dax,day;
|
int32_t dax,day;
|
||||||
int32_t alwaysshowgray = (showinnergray || !(editorzrange[0]==INT32_MIN && editorzrange[1]==INT_MAX));
|
int32_t alwaysshowgray = (showinnergray || !(editorzrange[0]==INT32_MIN && editorzrange[1]==INT32_MAX));
|
||||||
|
|
||||||
if (numwalls == 0)
|
if (numwalls == 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -826,7 +826,7 @@ char *Bstrupr(char *s)
|
||||||
uint32_t Bgetsysmemsize(void)
|
uint32_t Bgetsysmemsize(void)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
uint32_t siz = UINT_MAX;
|
uint32_t siz = UINT32_MAX;
|
||||||
HMODULE lib = LoadLibrary("KERNEL32.DLL");
|
HMODULE lib = LoadLibrary("KERNEL32.DLL");
|
||||||
|
|
||||||
if (lib)
|
if (lib)
|
||||||
|
@ -840,7 +840,7 @@ uint32_t Bgetsysmemsize(void)
|
||||||
MEMORYSTATUSEX memst;
|
MEMORYSTATUSEX memst;
|
||||||
memst.dwLength = sizeof(MEMORYSTATUSEX);
|
memst.dwLength = sizeof(MEMORYSTATUSEX);
|
||||||
if (aGlobalMemoryStatusEx(&memst))
|
if (aGlobalMemoryStatusEx(&memst))
|
||||||
siz = (uint32_t)min(UINT_MAX, memst.ullTotalPhys);
|
siz = (uint32_t)min(UINT32_MAX, memst.ullTotalPhys);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -854,7 +854,7 @@ uint32_t Bgetsysmemsize(void)
|
||||||
|
|
||||||
return siz;
|
return siz;
|
||||||
#elif (defined(_SC_PAGE_SIZE) || defined(_SC_PAGESIZE)) && defined(_SC_PHYS_PAGES) && !defined(GEKKO)
|
#elif (defined(_SC_PAGE_SIZE) || defined(_SC_PAGESIZE)) && defined(_SC_PHYS_PAGES) && !defined(GEKKO)
|
||||||
uint32_t siz = UINT_MAX;
|
uint32_t siz = UINT32_MAX;
|
||||||
int64_t scpagesiz, scphyspages;
|
int64_t scpagesiz, scphyspages;
|
||||||
|
|
||||||
#ifdef _SC_PAGE_SIZE
|
#ifdef _SC_PAGE_SIZE
|
||||||
|
@ -864,14 +864,14 @@ uint32_t Bgetsysmemsize(void)
|
||||||
#endif
|
#endif
|
||||||
scphyspages = sysconf(_SC_PHYS_PAGES);
|
scphyspages = sysconf(_SC_PHYS_PAGES);
|
||||||
if (scpagesiz >= 0 && scphyspages >= 0)
|
if (scpagesiz >= 0 && scphyspages >= 0)
|
||||||
siz = (uint32_t)min(UINT_MAX, (int64_t)scpagesiz * (int64_t)scphyspages);
|
siz = (uint32_t)min(UINT32_MAX, (int64_t)scpagesiz * (int64_t)scphyspages);
|
||||||
|
|
||||||
//initprintf("Bgetsysmemsize(): %d pages of %d bytes, %d bytes of system memory\n",
|
//initprintf("Bgetsysmemsize(): %d pages of %d bytes, %d bytes of system memory\n",
|
||||||
// scphyspages, scpagesiz, siz);
|
// scphyspages, scpagesiz, siz);
|
||||||
|
|
||||||
return siz;
|
return siz;
|
||||||
#else
|
#else
|
||||||
return UINT_MAX;
|
return UINT32_MAX;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2687,7 +2687,7 @@ nullquote:
|
||||||
int64_t dax=Gv_GetVarX(*insptr++), day=Gv_GetVarX(*insptr++);
|
int64_t dax=Gv_GetVarX(*insptr++), day=Gv_GetVarX(*insptr++);
|
||||||
int64_t hypsq = dax*dax + day*day;
|
int64_t hypsq = dax*dax + day*day;
|
||||||
|
|
||||||
if (hypsq > (int64_t)INT_MAX)
|
if (hypsq > (int64_t)INT32_MAX)
|
||||||
Gv_SetVarX(retvar, (int32_t)sqrt((double)hypsq));
|
Gv_SetVarX(retvar, (int32_t)sqrt((double)hypsq));
|
||||||
else
|
else
|
||||||
Gv_SetVarX(retvar, ksqrt((uint32_t)hypsq));
|
Gv_SetVarX(retvar, ksqrt((uint32_t)hypsq));
|
||||||
|
|
Loading…
Reference in a new issue