mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 00:42:08 +00:00
- cleanup of the screentext consolidation
Since SetIfGreater is only used by the text code, the redundant copies could be removed.
This commit is contained in:
parent
822079abe0
commit
4788dc42fb
4 changed files with 2 additions and 23 deletions
|
@ -763,14 +763,6 @@ inline int approxDist(int dx, int dy)
|
|||
return dx+dy;
|
||||
}
|
||||
|
||||
// the point of this is to prevent re-running a function or calculation passed to potentialValue
|
||||
// without making a new variable under each individual circumstance
|
||||
inline void SetIfGreater(int32_t* variable, int32_t potentialValue)
|
||||
{
|
||||
if (potentialValue > * variable)
|
||||
* variable = potentialValue;
|
||||
}
|
||||
|
||||
class Rect {
|
||||
public:
|
||||
int x0, y0, x1, y1;
|
||||
|
|
|
@ -1734,7 +1734,7 @@ void useEffectGen(XSPRITE* pXSource, spritetype* pSprite) {
|
|||
break;
|
||||
case 3:
|
||||
case 4:
|
||||
// if (!sectRangeIsFine(pSprite->sectnum)) fallthrough__; Code is wrong
|
||||
// if (!sectRangeIsFine(pSprite->sectnum)) f allthrough__; Code is wrong
|
||||
pos = (pXSource->data4 == 3) ? sector[pSprite->sectnum].floorz : sector[pSprite->sectnum].ceilingz;
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "screentext.h"
|
||||
#include "build.h"
|
||||
|
||||
static inline void SetIfGreater(int32_t *variable, int32_t potentialValue)
|
||||
inline void SetIfGreater(int32_t *variable, int32_t potentialValue)
|
||||
{
|
||||
if (potentialValue > *variable)
|
||||
*variable = potentialValue;
|
||||
|
|
|
@ -426,8 +426,6 @@ static inline int G_GetMusicIdx(const char *str)
|
|||
|
||||
extern void G_PrintCurrentMusic(void);
|
||||
|
||||
EXTERN_INLINE_HEADER void SetIfGreater(int32_t *variable, int32_t potentialValue);
|
||||
|
||||
template <typename T>
|
||||
static inline int G_GetViewscreenSizeShift(T const *tspr)
|
||||
{
|
||||
|
@ -446,17 +444,6 @@ static inline int G_GetViewscreenSizeShift(T const *tspr)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined game_c_ || !defined DISABLE_INLINING
|
||||
|
||||
// the point of this is to prevent re-running a function or calculation passed to potentialValue
|
||||
// without making a new variable under each individual circumstance
|
||||
EXTERN_INLINE void SetIfGreater(int32_t *variable, int32_t potentialValue)
|
||||
{
|
||||
if (potentialValue > *variable)
|
||||
*variable = potentialValue;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue