summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Bradley <jcb@pikum.xyz>2025-03-26 11:14:50 -0400
committerJonathan Bradley <jcb@pikum.xyz>2025-03-26 11:14:50 -0400
commit5199a0cefb6facbedf406fd3a141dfe09ffab68b (patch)
treed6941940e3a0d93512a8741b898e96745598a32a
parent190596500eaf3f353fb2d6432c5b48a39cdf9282 (diff)
pk.h: fix compiler warnings and errors
-rw-r--r--pkbktarr.h1
-rw-r--r--pkuuid.h9
2 files changed, 8 insertions, 2 deletions
diff --git a/pkbktarr.h b/pkbktarr.h
index 7ab9840..0166896 100644
--- a/pkbktarr.h
+++ b/pkbktarr.h
@@ -34,6 +34,7 @@ struct pk_bkt_arr_handle pk_bkt_arr_handle_increment(struct pk_bkt_arr *arr, str
struct pk_bkt_arr_handle pk_bkt_arr_handle_decrement(struct pk_bkt_arr *arr, struct pk_bkt_arr_handle h);
#if defined (__cplusplus)
+#include <assert.h>
template<typename T>
struct pk_bkt_arr_t : public pk_bkt_arr {
pk_bkt_arr_t();
diff --git a/pkuuid.h b/pkuuid.h
index 30d4a24..8639e87 100644
--- a/pkuuid.h
+++ b/pkuuid.h
@@ -25,8 +25,8 @@ bool pk_uuid_equals(struct pk_uuid lhs, struct pk_uuid rhs);
#include <iomanip>
std::ostream& operator<<(std::ostream &o, const struct pk_uuid& uuid);
std::istream& operator>>(std::istream &i, struct pk_uuid& uuid);
-bool operator==(const pk_uuid &lhs, const pk_uuid &rhs) { return pk_uuid_equals(lhs, rhs); }
-bool operator!=(const pk_uuid &lhs, const pk_uuid &rhs) { return !pk_uuid_equals(lhs, rhs); }
+bool operator==(const pk_uuid &lhs, const pk_uuid &rhs);
+bool operator!=(const pk_uuid &lhs, const pk_uuid &rhs);
#endif
#endif /* PK_UUID_H */
@@ -210,6 +210,11 @@ err_out:
uuid = pk_uuid_zed;
return i;
}
+
+bool operator==(const pk_uuid &lhs, const pk_uuid &rhs) { return pk_uuid_equals(lhs, rhs); }
+
+bool operator!=(const pk_uuid &lhs, const pk_uuid &rhs) { return !pk_uuid_equals(lhs, rhs); }
+
#endif
#endif