Merge ff6bcecd9f into cc4da9a05f
This commit is contained in:
commit
9aee1e688a
|
|
@ -953,24 +953,22 @@ DBFullResidueMask(type, rmask)
|
||||||
TileType type;
|
TileType type;
|
||||||
TileTypeBitMask *rmask;
|
TileTypeBitMask *rmask;
|
||||||
{
|
{
|
||||||
TileType t;
|
LayerInfo *li = &dbLayerInfo[type];
|
||||||
TileTypeBitMask *lmask;
|
const TileTypeBitMask *lmask = &li->l_residues;
|
||||||
LayerInfo *li, *lr;
|
|
||||||
|
|
||||||
li = &dbLayerInfo[type];
|
|
||||||
lmask = &li->l_residues;
|
|
||||||
TTMaskZero(rmask);
|
|
||||||
|
|
||||||
if (type < DBNumUserLayers)
|
if (type < DBNumUserLayers)
|
||||||
{
|
{
|
||||||
TTMaskSetMask(rmask, &li->l_residues);
|
TTMaskCopy(rmask, lmask);
|
||||||
}
|
}
|
||||||
else
|
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))
|
if (TTMaskHasType(lmask, t))
|
||||||
{
|
{
|
||||||
lr = &dbLayerInfo[t];
|
LayerInfo *lr = &dbLayerInfo[t];
|
||||||
TTMaskSetMask(rmask, &lr->l_residues);
|
TTMaskSetMask(rmask, &lr->l_residues);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -938,7 +938,7 @@ extern TileType DBTechFindStacking();
|
||||||
extern bool DBIsContact();
|
extern bool DBIsContact();
|
||||||
extern PlaneMask DBLayerPlanes();
|
extern PlaneMask DBLayerPlanes();
|
||||||
|
|
||||||
extern TileTypeBitMask *DBResidueMask();
|
extern __nodiscard__ TileTypeBitMask *DBResidueMask(TileType type);
|
||||||
extern void DBFullResidueMask();
|
extern void DBFullResidueMask();
|
||||||
|
|
||||||
/* Miscellaneous */
|
/* Miscellaneous */
|
||||||
|
|
|
||||||
|
|
@ -51,6 +51,10 @@ add_generated_mask_macro(
|
||||||
"TTMaskZero(m)",
|
"TTMaskZero(m)",
|
||||||
"(m)->tt_words[{i}] = 0",
|
"(m)->tt_words[{i}] = 0",
|
||||||
)
|
)
|
||||||
|
add_generated_mask_macro(
|
||||||
|
"TTMaskCopy(m, n)",
|
||||||
|
"(m)->tt_words[{i}] = (n)->tt_words[{i}]",
|
||||||
|
)
|
||||||
add_generated_mask_macro(
|
add_generated_mask_macro(
|
||||||
"TTMaskIsZero(m)",
|
"TTMaskIsZero(m)",
|
||||||
"(m)->tt_words[{i}] == 0",
|
"(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 */
|
/* looking to squash excessive -Wpedantic warnings ? add into defs.mak: CPPFLAGS += -Wno-variadic-macros */
|
||||||
#define ANALYSER_NONNULL(n...) __attribute__((nonnull(n)))
|
#define ANALYSER_NONNULL(n...) __attribute__((nonnull(n)))
|
||||||
#define ANALYSER_RETURNS_NONNULL __attribute__((returns_nonnull))
|
#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
|
#else
|
||||||
#define ATTR_FORMAT_PRINTF_1 /* */
|
#define ATTR_FORMAT_PRINTF_1 /* */
|
||||||
#define ATTR_FORMAT_PRINTF_2 /* */
|
#define ATTR_FORMAT_PRINTF_2 /* */
|
||||||
|
|
@ -207,6 +222,8 @@ extern char AbortMessage[];
|
||||||
#define ANALYSER_MALLOC(dealloc, idx) /* */
|
#define ANALYSER_MALLOC(dealloc, idx) /* */
|
||||||
#define ANALYSER_NONNULL(n...) /* */
|
#define ANALYSER_NONNULL(n...) /* */
|
||||||
#define ANALYSER_RETURNS_NONNULL /* */
|
#define ANALYSER_RETURNS_NONNULL /* */
|
||||||
|
|
||||||
|
#define __nodiscard__ /* */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ---------------- Start of Machine Configuration Section ----------------- */
|
/* ---------------- Start of Machine Configuration Section ----------------- */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue