mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-27 22:05:17 +01:00
Refactor ABM/LBM related code
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user