explicit prop_map(value_type P_of::*m_in) : member(m_in) { }
reference operator[](key_type k) const {
+ if (k.raw() == nullptr || &(k.raw()->props) == nullptr) {
+ throw std::invalid_argument("Invalid key");
+ }
return k.raw()->props.*member;
}
reference operator()(key_type k) const { return (*this)[k]; }
/// Perform an unaligned 64-bit load
static really_inline
u64a unaligned_load_u64a(const void *ptr) {
+ if (ptr == NULL) {
+ return 0; // Return a default value
+ }
struct unaligned { u64a u; } PACKED__MAY_ALIAS;
// cppcheck-suppress cstyleCast
const struct unaligned *uptr = (const struct unaligned *)ptr;