Use == in RealEquals and get rid of the memcmp there entirely.

This commit is contained in:
Christian Kamm
2008-07-28 20:50:41 +02:00
parent 20d429e085
commit cf4565095c
2 changed files with 1 additions and 9 deletions

View File

@@ -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)

View File

@@ -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