Merge ff6bcecd9f into a55ec49434
This commit is contained in:
commit
2e2450ba62
|
|
@ -953,24 +953,22 @@ DBFullResidueMask(type, rmask)
|
|||
TileType type;
|
||||
TileTypeBitMask *rmask;
|
||||
{
|
||||
TileType t;
|
||||
TileTypeBitMask *lmask;
|
||||
LayerInfo *li, *lr;
|
||||
|
||||
li = &dbLayerInfo[type];
|
||||
lmask = &li->l_residues;
|
||||
TTMaskZero(rmask);
|
||||
LayerInfo *li = &dbLayerInfo[type];
|
||||
const TileTypeBitMask *lmask = &li->l_residues;
|
||||
|
||||
if (type < DBNumUserLayers)
|
||||
{
|
||||
TTMaskSetMask(rmask, &li->l_residues);
|
||||
TTMaskCopy(rmask, lmask);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (t = TT_TECHDEPBASE; t < DBNumUserLayers; t++)
|
||||
TileType t;
|
||||
const int tt_last = DBNumUserLayers;
|
||||
TTMaskZero(rmask);
|
||||
for (t = TT_TECHDEPBASE; t < tt_last; t++)
|
||||
if (TTMaskHasType(lmask, t))
|
||||
{
|
||||
lr = &dbLayerInfo[t];
|
||||
LayerInfo *lr = &dbLayerInfo[t];
|
||||
TTMaskSetMask(rmask, &lr->l_residues);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -877,7 +877,7 @@ extern TileType DBTechFindStacking();
|
|||
extern bool DBIsContact();
|
||||
extern PlaneMask DBLayerPlanes();
|
||||
|
||||
extern TileTypeBitMask *DBResidueMask();
|
||||
extern __nodiscard__ TileTypeBitMask *DBResidueMask(TileType type);
|
||||
extern void DBFullResidueMask();
|
||||
|
||||
/* Miscellaneous */
|
||||
|
|
|
|||
|
|
@ -51,6 +51,10 @@ add_generated_mask_macro(
|
|||
"TTMaskZero(m)",
|
||||
"(m)->tt_words[{i}] = 0",
|
||||
)
|
||||
add_generated_mask_macro(
|
||||
"TTMaskCopy(m, n)",
|
||||
"(m)->tt_words[{i}] = (n)->tt_words[{i}]",
|
||||
)
|
||||
add_generated_mask_macro(
|
||||
"TTMaskIsZero(m)",
|
||||
"(m)->tt_words[{i}] == 0",
|
||||
|
|
|
|||
|
|
@ -194,6 +194,21 @@ extern char AbortMessage[];
|
|||
/* looking to squash excessive -Wpedantic warnings ? add into defs.mak: CPPFLAGS += -Wno-variadic-macros */
|
||||
#define ANALYSER_NONNULL(n...) __attribute__((nonnull(n)))
|
||||
#define ANALYSER_RETURNS_NONNULL __attribute__((returns_nonnull))
|
||||
|
||||
/* These have keyword like behaviour so __nodiscard__ looks more like a keyword and is recognisable as such
|
||||
* the historic use of __inline__ set a precedent on how backward compatibiliy maybe achieved for such things
|
||||
*/
|
||||
|
||||
#if (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 202311L))
|
||||
/* since C23 but maybe some compilers supported it before their official C23 releases */
|
||||
#define __nodiscard__ [[nodiscard]]
|
||||
#elif (defined(__GNUC__) && (__GNUC__ >= 4))
|
||||
#define __nodiscard__ __attribute__((warn_unused_result))
|
||||
#elif (defined(__clang__) && (__clang_major__ >= 1))
|
||||
#define __nodiscard__ __attribute__((warn_unused_result))
|
||||
#else
|
||||
#define __nodiscard__ /* */
|
||||
#endif
|
||||
#else
|
||||
#define ATTR_FORMAT_PRINTF_1 /* */
|
||||
#define ATTR_FORMAT_PRINTF_2 /* */
|
||||
|
|
@ -207,6 +222,8 @@ extern char AbortMessage[];
|
|||
#define ANALYSER_MALLOC(dealloc, idx) /* */
|
||||
#define ANALYSER_NONNULL(n...) /* */
|
||||
#define ANALYSER_RETURNS_NONNULL /* */
|
||||
|
||||
#define __nodiscard__ /* */
|
||||
#endif
|
||||
|
||||
/* ---------------- Start of Machine Configuration Section ----------------- */
|
||||
|
|
|
|||
Loading…
Reference in New Issue