Mercurial > projects > ldc
changeset 420:491264b7cb93
Use == in RealEquals and get rid of the memcmp there entirely.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Mon, 28 Jul 2008 20:50:41 +0200 |
parents | 023fa78c1203 |
children | 1c65b5477eaa |
files | dmd/expression.c dmd/mars.h |
diffstat | 2 files changed, 1 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/dmd/expression.c Mon Jul 28 08:05:21 2008 +0200 +++ b/dmd/expression.c Mon Jul 28 20:50:41 2008 +0200 @@ -1498,7 +1498,7 @@ /* 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)
--- a/dmd/mars.h Mon Jul 28 08:05:21 2008 +0200 +++ b/dmd/mars.h Mon Jul 28 20:50:41 2008 +0200 @@ -213,14 +213,6 @@ #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