1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Refactor ABM/LBM related code

This commit is contained in:
sfan5 2024-08-11 13:34:03 +02:00
parent 387856a1c3
commit 7ae51382c8
7 changed files with 295 additions and 269 deletions

View file

@ -28,6 +28,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,
// Requires <algorithm>
#define CONTAINS(c, v) (std::find((c).begin(), (c).end(), (v)) != (c).end())
// Requires <algorithm>
#define SORT_AND_UNIQUE(c) do { \
std::sort((c).begin(), (c).end()); \
(c).erase(std::unique((c).begin(), (c).end()), (c).end()); \
} while (0)
// To disable copy constructors and assignment operations for some class
// 'Foobar', add the macro DISABLE_CLASS_COPY(Foobar) in the class definition.
// Note this also disables copying for any classes derived from 'Foobar' as well