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:
parent
387856a1c3
commit
7ae51382c8
7 changed files with 295 additions and 269 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue