Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/cnglob.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,12 @@ typedef std::string WStr;
/*------------------------------- math -------------------------------------*/
// error handling
extern UINT doControlFP();
#ifdef _WIN32
#define FPCHECK __asm { fwait } // trap pending FP exception (if any)
// re searching for FP exceptions
#else
#define FPCHECK
#endif

// min and max (converted to template fcns, 10-12)
#undef min
Expand Down
12 changes: 6 additions & 6 deletions src/cnloads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3381,13 +3381,13 @@ RC RSYS::rs_EndSubhr()
// verify RSYSRES_IVL_SUB layout at compile time
// fixed sequence allows array access by rs_mode (see code below)
// rsmHEAT/rsmCOOL/rsmOAV definitions must be consistent with member sequences.
#define QZONECHK( m, oDif) static_assert( &((RSYSRES_IVL_SUB *)0)->m-&((RSYSRES_IVL_SUB *)0)->qhZoneSen == oDif, "Bad seq " #m)
#define QZONECHK( m, oDif) static_assert( offsetof(RSYSRES_IVL_SUB, m) - offsetof(RSYSRES_IVL_SUB, qhZoneSen) == oDif, "Bad seq " #m)
QZONECHK(qhZoneSen, (rsmHEAT - 1) * 2);
QZONECHK(qhZoneLat, (rsmHEAT - 1) * 2 + 1);
QZONECHK(qcZoneSen, (rsmCOOL - 1) * 2);
QZONECHK(qcZoneLat, (rsmCOOL - 1) * 2 + 1);
QZONECHK(qvZoneSen, (rsmOAV - 1) * 2);
QZONECHK(qvZoneLat, (rsmOAV - 1) * 2 + 1);
QZONECHK(qhZoneLat, (rsmHEAT - 1) * 2 + sizeof(float));
QZONECHK(qcZoneSen, (rsmCOOL - 1) * 2 * sizeof(float));
QZONECHK(qcZoneLat, (rsmCOOL - 1) * 2 * sizeof(float) + sizeof(float));
QZONECHK(qvZoneSen, (rsmOAV - 1) * 2 * sizeof(float));
QZONECHK(qvZoneLat, (rsmOAV - 1) * 2 * sizeof(float) + sizeof(float));
static_assert(rsmCOUNT == 4, "Bad rsm enum");
#undef QZONECHK

Expand Down