Conversation
src/CNLOADS.CPP
Outdated
| // 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) assert( &((RSYSRES_IVL_SUB *)0)->m-&((RSYSRES_IVL_SUB *)0)->qhZoneSen == oDif && "Bad seq " #m) |
There was a problem hiding this comment.
assert() is runtime. static_assert() is compile time. This was deliberately coded to be a compile time check so the runtime cost is not incurred every subhour. Can a method be found that does the compile time check and is OK on all compilers?
There was a problem hiding this comment.
I can look for a replacement. I was worried if that would be a problem. The error that I got was that it was non-constant condition. non-constant condition for static assertion.
There was a problem hiding this comment.
You could try &((const RSYSRES_IVL_SUB *)0)->m - &((const RSYSRES_IVL_SUB *)0)->qhZoneSen
That is, add consts.
src/CNLOADS.CPP
Outdated
| { // shades closed | ||
| xs_pFENAW[ 1]->fa_Subhr( min( fSC, 1.f), bDoFrm); | ||
| } | ||
| #ifdef _WIN32 |
There was a problem hiding this comment.
Why do this? Why not conditionally #define FPCHECK as needed for different platforms. E.g., #define it as nothing if suitable functionality cannot be found. Then you touch cnglob.h only, not every place FPCHECK is used.
Description
Updates CNLOADS to build at all platforms.
Changes:
*0Replace the content in this section with:
Author Progress Checklist:
Reviewer Checklist: