summaryrefslogtreecommitdiff
path: root/pkmem-types.h
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-01-10 10:08:05 -0500
committerJonathan Bradley <jcb@pikum.xyz>2025-01-10 10:08:05 -0500
commit79e040d203e63ec79bb124215dcd1e940f7b676c (patch)
tree23c11c6911b99161d0063e63122d9dd15485e1ed /pkmem-types.h
parent74fb835d28f2a4e604a32fd292bb3060a832a1db (diff)
pk.h: handle gcc compiler warnings; breaking changes
Diffstat (limited to 'pkmem-types.h')
-rw-r--r--pkmem-types.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/pkmem-types.h b/pkmem-types.h
index cf779d9..7f7a2ac 100644
--- a/pkmem-types.h
+++ b/pkmem-types.h
@@ -18,13 +18,17 @@ struct pk_handle {
pk_handle_item_index_T itemIndex;
};
-#define PK_HANDLE_MAX ((struct pk_handle){ .bucketIndex = 0xFFFFFFFF, .itemIndex = 0xFFFFFFFF })
+#if ! defined(__cplusplus)
+ #define PK_HANDLE_MAX ((struct pk_handle){ .bucketIndex = 0xFFFFFFFF, .itemIndex = 0xFFFFFFFF })
+#else
+ #define PK_HANDLE_MAX (pk_handle{ 0xFFFFFFFF, 0xFFFFFFFF })
+#endif
enum PK_HANDLE_VALIDATION pk_handle_validate(const struct pk_handle handle, const struct pk_handle bucketHandle, const uint64_t maxItems);
#if defined(__cplusplus)
-constexpr struct pk_handle pk_handle_MAX_constexpr = (struct pk_handle){ .bucketIndex = 0xFFFFFFFF, .itemIndex = 0xFFFFFFFF };
+constexpr struct pk_handle pk_handle_MAX_constexpr = { 0xFFFFFFFF, 0xFFFFFFFF };
inline constexpr bool
operator==(const pk_handle& lhs, const pk_handle& rhs)