ManaPlus
Macros
checkutils.h File Reference

(4e607dc)

#include "logger.h"

Go to the source code of this file.

Macros

#define reportFalseReal(val)   (val)
 
#define reportTrueReal(val)   (val)
 
#define reportAlwaysReal(...)
 
#define returnFalseVReal(val)
 
#define returnTrueVReal(val)
 
#define returnFalseReal(ret, val)
 
#define returnTrueReal(ret, val)
 
#define returnNullptrVReal(val)
 
#define returnNullptrReal(ret, val)
 
#define failFalse(val)   (val)
 
#define failTrue(val)   (val)
 
#define returnFailFalseV(val)
 
#define returnFailTrueV(val)
 
#define returnFailFalse(ret, val)
 
#define returnFailTrue(ret, val)
 
#define returnFailNullptrV(val)
 
#define returnFailNullptr(ret, val)
 
#define failAlways(...)   ;
 
#define reportFalse(val)   reportFalseReal(val)
 
#define reportTrue(val)   reportTrueReal(val)
 
#define reportAlways(...)   reportAlwaysReal(__VA_ARGS__)
 
#define returnFalseV(val)   returnFalseVReal(val)
 
#define returnTrueV(val)   returnTrueVReal(val)
 
#define returnFalse(ret, val)   returnFalseReal(ret, val)
 
#define returnTrue(ret, val)   returnTrueReal(ret, val)
 
#define returnNullptrV(val)   returnNullptrVReal(val)
 
#define returnNullptr(ret, val)   returnNullptrReal(ret, val)
 

Macro Definition Documentation

◆ failAlways

#define failAlways (   ...)    ;

Definition at line 235 of file checkutils.h.

◆ failFalse

#define failFalse (   val)    (val)

Definition at line 208 of file checkutils.h.

◆ failTrue

#define failTrue (   val)    (val)

Definition at line 209 of file checkutils.h.

◆ reportAlways

#define reportAlways (   ...)    reportAlwaysReal(__VA_ARGS__)

Definition at line 252 of file checkutils.h.

Referenced by SDLImageHelper::_SDLload(), Being::addCast(), MapReader::addLayerToList(), SpriteDef::addSequence(), OpenGLImageHelper::bindTexture(), CastingEffect::CastingEffect(), OpenGLImageHelper::convertSurface(), OpenGLImageHelper::convertSurfaceNormalize(), VirtFs::create_rwops(), ActorManager::createBeing(), AtlasManager::createSDLAtlas(), SDLImageHelper::createTextSurface(), ResourceManager::deleteInstance(), ResourceManager::deleteResourceManager(), XML::Document::Document(), StaticBrowserBox::draw(), BrowserBox::draw(), Viewport::drawPath(), VirtFs::enumerateFiles(), VirtFs::FsDir::eof(), InputManager::executeChatCommand(), VirtFs::exists(), VirtFs::FsDir::fileLength(), Font::Font(), NPCDB::get(), PETDB::get(), SkillUnitDb::get(), ClanDb::get(), MercenaryDB::get(), MonsterDB::get(), ElementalDb::get(), HomunculusDB::get(), HorseDB::get(), EmoteDB::get(), ItemDB::get(), ResourceManager::get(), EmoteDB::get2(), GroupDb::getBadge(), Configuration::getBoolValue(), ItemInfo::getColor(), ItemInfo::getColorName(), VirtFs::getDirs(), VirtFs::getFiles(), VirtFs::getFilesWithDir(), Configuration::getFloatValue(), GroupDb::getGroup(), ColorDB::getHairColorName(), GroupDb::getHighlightName(), ItemInfo::getIconColor(), ItemInfo::getIconColorName(), SpriteDef::getImageSet(), Configuration::getIntValue(), GroupDb::getLongName(), GroupDb::getName(), VirtFs::getRealDir(), GroupDb::getShowBadge(), StatusEffectDB::getStatusEffect(), Configuration::getStringValue(), OpenGLImageHelper::glLoad(), PopupMenu::handleLink(), SpriteDef::includeSprite(), inflateMemory(), ConfigManager::initConfiguration(), SimpleAnimation::initializeAnimation(), ConfigManager::initServerConfig(), Client::initTradeFilter(), VirtFs::isDirectory(), VirtFs::FsDir::isSymbolicLink(), AtlasLoader::load(), EmptyAtlasLoader::load(), anonymous_namespace{rescaledloader.cpp}::RescaledLoader::load(), anonymous_namespace{soundloader.cpp}::ResourceLoader::load(), WalkLayerLoader::load(), anonymous_namespace{musicloader.cpp}::ResourceLoader::load(), ImageSetLoader::load(), anonymous_namespace{shaderloader.cpp}::ShaderLoader::load(), anonymous_namespace{subimageloader.cpp}::SubImageLoader::load(), anonymous_namespace{imageloader.cpp}::DyedImageLoader::load(), anonymous_namespace{shaderprogramloader.cpp}::ShaderProgramLoader::load(), SpriteDef::load(), SDLImageHelper::load(), OpenGLImageHelper::load(), SpriteDef::loadAction(), SpriteDef::loadAnimation(), loadBasicStats(), loadCurrencies(), loadFields(), VirtFs::FsDir::loadFile(), VirtFs::loadFile(), ColorDB::loadHair(), SpriteDef::loadImageSet(), ShopWindow::loadList(), loadMusic(), loadNpcDialogMenu(), loadOffset(), PaletteDB::loadPalette(), loadReplaceLayer(), loadRiderOffset(), loadSoundRef(), EmoteDB::loadSpecialXmlFile(), loadStats(), Files::loadTextFileLocal(), LanguageDb::loadXmlFile(), StatDb::loadXmlFile(), PETDB::loadXmlFile(), SkillUnitDb::loadXmlFile(), GroupDb::loadXmlFile(), ItemOptionDb::loadXmlFile(), ClanDb::loadXmlFile(), HorseDB::loadXmlFile(), EmoteDB::loadXmlFile(), ItemDB::loadXmlFile(), NPCDB::loadXmlFile(), SkillDialog::loadXmlFile(), VirtFs::FsDir::mkdir(), VirtFs::mountDirInternal(), VirtFs::mountZip(), VirtFs::mountZip2(), BasicContainer::moveToBottom(), BasicContainer::moveToTop(), VirtFs::openAppend(), VirtFs::FsZip::openAppend(), Font::openFont(), VirtFs::FsDir::openInternal(), VirtFs::openRead(), VirtFs::openWrite(), VirtFs::FsZip::openWrite(), parseCommand(), parseInherit(), parsePermission(), parseUseFlag(), Window::postInit(), prepareFsPath(), EquipmentWindow::prepareSlotNames(), EAthena::Mail2Recv::processAddItemResult(), EAthena::Mail2Recv::processCheckNameResult(), EAthena::ClanRecv::processClanChat(), EAthena::ClanRecv::processClanInfo(), EAthena::ElementalRecv::processElementalUpdateStatus(), EAthena::GuildRecv::processGuildMemberList(), EAthena::Mail2Recv::processMailDelete(), EAthena::Mail2Recv::processMailListPage(), EAthena::MercenaryRecv::processMercenaryUpdate(), EAthena::PartyRecv::processPartyMemberJobLevel(), EAthena::MailRecv::processReadMail(), EAthena::Mail2Recv::processReadMail(), EAthena::Mail2Recv::processRemoveItemResult(), VirtFs::FsDir::read(), VirtFs::FsZip::read(), VirtFs::ZipReader::readArchiveInfo(), MapReader::readBase64Layer(), VirtFs::ZipReader::readCompressedFile(), VirtFs::ZipReader::readFile(), readItemStatsString(), readItemStatsVector(), MapReader::readTileset(), EAthena::Network::registerFakeHandlers(), ResourceManager::release(), VirtFs::FsDir::remove(), VirtFs::ZipReader::reportZlibError(), Configuration::resetBoolValue(), Configuration::resetIntValue(), VirtFs::FsDir::rwops_close(), VirtFs::FsDir::rwops_read(), VirtFs::FsDir::rwops_seek(), VirtFs::FsDir::rwops_write(), Map::saveExtraLayer(), ShopWindow::saveList(), Files::saveTextFile(), WindowContainer::scheduleDelete(), SDLgfxBlitRGBA(), VirtFs::FsDir::seek(), EAthena::Mail2Handler::sendMail(), EAthena::setBasicFields(), Inventory::setCards(), Inventory::setItem(), Inventory::setOptions(), Being::setSubtype(), Inventory::setTag(), VirtFs::FsDir::tell(), EffectManager::trigger(), EffectManager::triggerReturn(), VirtFs::unmountDir(), VirtFs::unmountDir2(), VirtFs::unmountDirSilent(), VirtFs::unmountDirSilent2(), VirtFs::unmountZip(), VirtFs::unmountZip2(), SkillDialog::useSkillDefault(), SkillDialog::useSkillPosition(), SkillDialog::useSkillTarget(), Window::Window(), Configuration::write(), VirtFs::FsDir::write(), PacketLimiter::writePacketLimits(), PngLib::writePNG(), and Window::~Window().

◆ reportAlwaysReal

#define reportAlwaysReal (   ...)
Value:
{ \
logger->log("Error:"); \
logger->log( \
__VA_ARGS__); \
}

Definition at line 177 of file checkutils.h.

◆ reportFalse

#define reportFalse (   val)    reportFalseReal(val)

Definition at line 250 of file checkutils.h.

Referenced by ActorSprite::~ActorSprite().

◆ reportFalseReal

#define reportFalseReal (   val)    (val)

Definition at line 174 of file checkutils.h.

◆ reportTrue

#define reportTrue (   val)    reportTrueReal(val)

◆ reportTrueReal

#define reportTrueReal (   val)    (val)

Definition at line 175 of file checkutils.h.

◆ returnFailFalse

#define returnFailFalse (   ret,
  val 
)
Value:
if (!(val)) \
return ret;

Definition at line 219 of file checkutils.h.

◆ returnFailFalseV

#define returnFailFalseV (   val)
Value:
if (!(val)) \
return;

Definition at line 211 of file checkutils.h.

◆ returnFailNullptr

#define returnFailNullptr (   ret,
  val 
)
Value:
if ((val) == nullptr) \
return ret;

Definition at line 231 of file checkutils.h.

◆ returnFailNullptrV

#define returnFailNullptrV (   val)
Value:
if ((val) == nullptr) \
return;

Definition at line 227 of file checkutils.h.

◆ returnFailTrue

#define returnFailTrue (   ret,
  val 
)
Value:
if (val) \
return ret;

Definition at line 223 of file checkutils.h.

◆ returnFailTrueV

#define returnFailTrueV (   val)
Value:
if (val) \
return;

Definition at line 215 of file checkutils.h.

◆ returnFalse

#define returnFalse (   ret,
  val 
)    returnFalseReal(ret, val)

Definition at line 255 of file checkutils.h.

◆ returnFalseReal

#define returnFalseReal (   ret,
  val 
)
Value:
if (!(val)) \
return ret;

Definition at line 192 of file checkutils.h.

◆ returnFalseV

#define returnFalseV (   val)    returnFalseVReal(val)

Definition at line 253 of file checkutils.h.

◆ returnFalseVReal

#define returnFalseVReal (   val)
Value:
if (!(val)) \
return;

Definition at line 184 of file checkutils.h.

◆ returnNullptr

#define returnNullptr (   ret,
  val 
)    returnNullptrReal(ret, val)

Definition at line 258 of file checkutils.h.

Referenced by ActorManager::cloneBeing(), and ActorManager::findItem().

◆ returnNullptrReal

#define returnNullptrReal (   ret,
  val 
)
Value:
if ((val) == nullptr) \
return ret;

Definition at line 204 of file checkutils.h.

◆ returnNullptrV

#define returnNullptrV (   val)    returnNullptrVReal(val)

◆ returnNullptrVReal

#define returnNullptrVReal (   val)
Value:
if ((val) == nullptr) \
return;

Definition at line 200 of file checkutils.h.

◆ returnTrue

#define returnTrue (   ret,
  val 
)    returnTrueReal(ret, val)

Definition at line 256 of file checkutils.h.

◆ returnTrueReal

#define returnTrueReal (   ret,
  val 
)
Value:
if (val) \
return ret;

Definition at line 196 of file checkutils.h.

◆ returnTrueV

#define returnTrueV (   val)    returnTrueVReal(val)

Definition at line 254 of file checkutils.h.

◆ returnTrueVReal

#define returnTrueVReal (   val)
Value:
if (val) \
return;

Definition at line 188 of file checkutils.h.