mirror of
https://github.com/nzp-team/dquakeplus.git
synced 2025-02-16 16:41:03 +00:00
Inlining is too annoying, use a macro instead
This commit is contained in:
parent
7aa4b8578d
commit
174abedc06
2 changed files with 5 additions and 24 deletions
|
@ -436,11 +436,9 @@ void Q_snprintfz (char *dest, size_t size, char *fmt, ...)
|
|||
qboolean bigendien;
|
||||
|
||||
short (*BigShort) (short l);
|
||||
short (*LittleShort) (short l);
|
||||
int (*BigLong) (int l);
|
||||
int (*LittleLong) (int l);
|
||||
float (*BigFloat) (float l);
|
||||
float (*LittleFloat) (float l);
|
||||
|
||||
|
||||
short ShortSwap (short l)
|
||||
{
|
||||
|
@ -452,11 +450,6 @@ short ShortSwap (short l)
|
|||
return (b1<<8) + b2;
|
||||
}
|
||||
|
||||
static inline short ShortNoSwap (short l)
|
||||
{
|
||||
return l;
|
||||
}
|
||||
|
||||
int LongSwap (int l)
|
||||
{
|
||||
byte b1,b2,b3,b4;
|
||||
|
@ -469,11 +462,6 @@ int LongSwap (int l)
|
|||
return ((int)b1<<24) + ((int)b2<<16) + ((int)b3<<8) + b4;
|
||||
}
|
||||
|
||||
static inline int LongNoSwap (int l)
|
||||
{
|
||||
return l;
|
||||
}
|
||||
|
||||
float FloatSwap (float f)
|
||||
{
|
||||
union
|
||||
|
@ -491,11 +479,6 @@ float FloatSwap (float f)
|
|||
return dat2.f;
|
||||
}
|
||||
|
||||
static inline float FloatNoSwap (float f)
|
||||
{
|
||||
return f;
|
||||
}
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
|
||||
|
@ -1183,11 +1166,8 @@ void COM_Init (char *basedir)
|
|||
// force set little endian to be cool and fast
|
||||
bigendien = false;
|
||||
BigShort = ShortSwap;
|
||||
LittleShort = ShortNoSwap;
|
||||
BigLong = LongSwap;
|
||||
LittleLong = LongNoSwap;
|
||||
BigFloat = FloatSwap;
|
||||
LittleFloat = FloatNoSwap;
|
||||
|
||||
Cmd_AddCommand ("path", COM_Path_f);
|
||||
|
||||
|
|
|
@ -108,9 +108,10 @@ extern qboolean bigendien;
|
|||
extern short (*BigShort) (short l);
|
||||
extern short (*LittleShort) (short l);
|
||||
extern int (*BigLong) (int l);
|
||||
extern int (*LittleLong) (int l);
|
||||
extern float (*BigFloat) (float l);
|
||||
extern float (*LittleFloat) (float l);
|
||||
|
||||
#define LittleLong(l) l
|
||||
#define LittleShort(l) l
|
||||
#define LittleFloat(l) l
|
||||
|
||||
//============================================================================
|
||||
|
||||
|
|
Loading…
Reference in a new issue