Minetest 5.10.0-dev
 
Loading...
Searching...
No Matches
basic_macros.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ARRLEN(x)   (sizeof(x) / sizeof((x)[0]))
 
#define MYMIN(a, b)   ((a) < (b) ? (a) : (b))
 
#define MYMAX(a, b)   ((a) > (b) ? (a) : (b))
 
#define CONTAINS(c, v)   (std::find((c).begin(), (c).end(), (v)) != (c).end())
 
#define DISABLE_CLASS_COPY(C)
 
#define ALLOW_CLASS_MOVE(C)
 

Macro Definition Documentation

◆ ALLOW_CLASS_MOVE

#define ALLOW_CLASS_MOVE ( C)
Value:
C(C &&other) = default; \
C &operator=(C &&) = default;

◆ ARRLEN

◆ CONTAINS

◆ DISABLE_CLASS_COPY

#define DISABLE_CLASS_COPY ( C)
Value:
C(const C &) = delete; \
C &operator=(const C &) = delete;

◆ MYMAX

#define MYMAX ( a,
b )   ((a) > (b) ? (a) : (b))

Referenced by ABMWithState::ABMWithState(), con::ConnectionSendThread::ConnectionSendThread(), GUIChatConsole::GUIChatConsole(), GUITable::GUITable(), MeshUpdateManager::MeshUpdateManager(), RenderingEngine::RenderingEngine(), MapgenV6::addMud(), addPostProcessing(), MapblockMeshGenerator::blendLightColor(), con::CALC_DTIME(), CavesRandomWalk::carveRoute(), CavesV6::carveRoute(), PlayerSAO::checkMovementCheat(), clamp_u8(), ChatPrompt::clampView(), NodeDefManager::clear(), ServerEnvironment::clearObjects(), collisionMoveSimple(), componentwise_max(), ExtrusionMeshCache::create(), ChatPrompt::cursorOperation(), MapblockMeshGenerator::drawAutoLightedCuboid(), GUIEngine::drawBackground(), GUIChatConsole::drawPrompt(), sound::PlayingSound::fade(), OreSheet::generate(), OreStratum::generate(), MapgenBasic::generateBiomes(), MapgenV6::generateCaves(), ShaderSource::generateShader(), get_mapgen_edges(), getDownscaleFactor(), getFaceLight(), Camera::getFovMax(), MapNode::getLight(), Pathfinder::getPath(), MapgenFlat::getSpawnLevelAtPoint(), MapgenFractal::getSpawnLevelAtPoint(), MapgenV5::getSpawnLevelAtPoint(), Pathfinder::getXZManhattanDist(), ClientMediaDownloader::initialStep(), isBlockInSight(), Mapgen::lightSpread(), CavesRandomWalk::makeCave(), CavesV6::makeCave(), Client::makeScreenshot(), Game::nodePlacement(), LocalPlayer::old_move(), GUITable::OnEvent(), GUIFormSpecMenu::parseSize(), Ore::placeOre(), read_hud_change(), read_hud_element(), UDPSocket::Receive(), Sky::render(), con::ConnectionSendThread::run(), con::ConnectionSendThread::runTimeouts(), AreaStore::setCacheParams(), GUITable::setOverrideFont(), GUITable::setTable(), ClientEnvironment::step(), PlayerSAO::step(), ClientEnvironment::updateFrameTime(), GenericCAO::updateLight(), GUITable::updateScrollBar(), and UDPSocket::WaitData().

◆ MYMIN

#define MYMIN ( a,
b )   ((a) < (b) ? (a) : (b))