refactor: use squared distance if possible

refactor: add some const-correctness to code
This commit is contained in:
jeefo 2023-06-24 02:36:51 +03:00
commit 4a35a87b25
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
24 changed files with 579 additions and 567 deletions

View file

@ -27,7 +27,7 @@ public:
public:
constexpr bool operator == (const DangerStorage &rhs) const {
return rhs.data[2] == data[2] && rhs.data[1] == data[1] && rhs.data[0] == data[0];
return cr::memcmp (rhs.data, data, sizeof (data));
}
constexpr bool operator != (const DangerStorage &rhs) const {