src/main.h

changeset 51
1a9eac27698d
parent 46
98645c8e7704
child 55
cb81ecb5fb23
equal deleted inserted replaced
50:0f80a2e5e42b 51:1a9eac27698d
39 std::int32_t value; 39 std::int32_t value;
40 constexpr bool operator<(ldraw::Id other) const 40 constexpr bool operator<(ldraw::Id other) const
41 { 41 {
42 return this->value < other.value; 42 return this->value < other.value;
43 } 43 }
44 friend constexpr unsigned int qHash(ldraw::Id id)
45 {
46 return qHash(id.value);
47 }
48 friend bool operator==(ldraw::Id one, ldraw::Id other)
49 {
50 return one.value == other.value;
51 }
44 }; 52 };
45 using id_t = Id; 53 using id_t = Id;
46 constexpr id_t NULL_ID = id_t{0}; 54 constexpr id_t NULL_ID = id_t{0};
47 } 55 }
48 56

mercurial