mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-18 22:03:14 +01:00
Use == in RealEquals and get rid of the memcmp there entirely.
This commit is contained in:
@@ -1498,7 +1498,7 @@ int RealEquals(real_t x1, real_t x2)
|
||||
/* In some cases, the REALPAD bytes get garbage in them,
|
||||
* so be sure and ignore them.
|
||||
*/
|
||||
memcmp(&x1, &x2, REAL_T_SIZE - REAL_T_PAD) == 0;
|
||||
x1 == x2;
|
||||
}
|
||||
|
||||
int RealExp::equals(Object *o)
|
||||
|
||||
@@ -213,14 +213,6 @@ typedef d_uns32 d_dchar;
|
||||
#include "d-gcc-real.h"
|
||||
#else
|
||||
typedef long double real_t;
|
||||
// this should be enough
|
||||
#if defined(i386) || defined(__i386__) || defined(_WIN32) || defined(__MINGW32__)
|
||||
#define REAL_T_SIZE 12
|
||||
#define REAL_T_PAD 2
|
||||
#else
|
||||
#define REAL_T_SIZE sizeof(real_t)
|
||||
#define REAL_T_PAD 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Modify OutBuffer::writewchar to write the correct size of wchar
|
||||
|
||||
Reference in New Issue
Block a user