From 6f2d785d0ff761961912d7e79a7d16c4adf86861 Mon Sep 17 00:00:00 2001 From: ShadowNinja Date: Wed, 14 Oct 2015 02:39:30 -0400 Subject: Rename macros with two leading underscores These names are reserved for the compiler/library implementations. --- src/camera.cpp | 4 +- src/client.cpp | 20 +++++----- src/clientiface.cpp | 2 +- src/clientmap.cpp | 4 +- src/content_cao.cpp | 2 +- src/content_nodemeta.cpp | 6 +-- src/content_sao.cpp | 2 +- src/debug.h | 14 +++---- src/emerge.cpp | 2 +- src/environment.cpp | 8 ++-- src/httpfetch.cpp | 2 +- src/inventory.cpp | 4 +- src/inventorymanager.cpp | 2 +- src/map.cpp | 36 ++++++++--------- src/mapblock.cpp | 12 +++--- src/nodemetadata.cpp | 2 +- src/script/lua_api/l_server.cpp | 8 ++-- src/server.cpp | 88 ++++++++++++++++++++--------------------- src/unittest/test.cpp | 2 +- src/util/thread.h | 2 +- 20 files changed, 109 insertions(+), 113 deletions(-) (limited to 'src') diff --git a/src/camera.cpp b/src/camera.cpp index 0c6d03e4e..5370396a9 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -79,7 +79,7 @@ Camera::Camera(scene::ISceneManager* smgr, MapDrawControl& draw_control, m_camera_mode(CAMERA_MODE_FIRST) { - //dstream<<__FUNCTION_NAME< 2.0) @@ -824,7 +824,7 @@ void Client::initLocalMapSaving(const Address &address, void Client::ReceiveAll() { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); u32 start_ms = porting::getTimeMs(); for(;;) { @@ -850,7 +850,7 @@ void Client::ReceiveAll() void Client::Receive() { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); NetworkPacket pkt; m_con.Receive(&pkt); ProcessData(&pkt); @@ -867,7 +867,7 @@ inline void Client::handleCommand(NetworkPacket* pkt) */ void Client::ProcessData(NetworkPacket *pkt) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); ToClientCommand command = (ToClientCommand) pkt->getCommand(); u32 sender_peer_id = pkt->getPeerId(); @@ -1213,7 +1213,7 @@ void Client::sendChangePassword(const std::string &oldpassword, void Client::sendDamage(u8 damage) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); NetworkPacket pkt(TOSERVER_DAMAGE, sizeof(u8)); pkt << damage; @@ -1222,7 +1222,7 @@ void Client::sendDamage(u8 damage) void Client::sendBreath(u16 breath) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); NetworkPacket pkt(TOSERVER_BREATH, sizeof(u16)); pkt << breath; @@ -1231,7 +1231,7 @@ void Client::sendBreath(u16 breath) void Client::sendRespawn() { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); NetworkPacket pkt(TOSERVER_RESPAWN, 0); Send(&pkt); @@ -1239,7 +1239,7 @@ void Client::sendRespawn() void Client::sendReady() { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); NetworkPacket pkt(TOSERVER_CLIENT_READY, 1 + 1 + 1 + 1 + 2 + sizeof(char) * strlen(g_version_hash)); diff --git a/src/clientiface.cpp b/src/clientiface.cpp index a6ab1ef41..e7f127b84 100644 --- a/src/clientiface.cpp +++ b/src/clientiface.cpp @@ -67,7 +67,7 @@ void RemoteClient::GetNextBlocks ( float dtime, std::vector &dest) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); // Increment timers diff --git a/src/clientmap.cpp b/src/clientmap.cpp index 00a5b1021..b865c2780 100644 --- a/src/clientmap.cpp +++ b/src/clientmap.cpp @@ -81,7 +81,7 @@ ClientMap::~ClientMap() MapSector * ClientMap::emergeSector(v2s16 p2d) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); // Check that it doesn't exist already try{ return getSectorNoGenerate(p2d); @@ -400,7 +400,7 @@ struct MeshBufListList void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); bool is_transparent_pass = pass == scene::ESNRP_TRANSPARENT; diff --git a/src/content_cao.cpp b/src/content_cao.cpp index 270483764..b3f90aa9c 100644 --- a/src/content_cao.cpp +++ b/src/content_cao.cpp @@ -465,7 +465,7 @@ void ItemCAO::updateTexture() } catch(SerializationError &e) { - warningstream<<__FUNCTION_NAME + warningstream< 1) { - infostream<<__FUNCTION_NAME<<": version "<get(p) != NULL) { - warningstream<<__FUNCTION_NAME<<": " + warningstream< #endif - #define __NORETURN __declspec(noreturn) - #define __FUNCTION_NAME __FUNCTION__ #define NORETURN __declspec(noreturn) #define FUNCTION_NAME __FUNCTION__ #else - #define __NORETURN __attribute__ ((__noreturn__)) - #define __FUNCTION_NAME __PRETTY_FUNCTION__ #define NORETURN __attribute__ ((__noreturn__)) #define FUNCTION_NAME __PRETTY_FUNCTION__ #endif @@ -57,16 +53,16 @@ with this program; if not, write to the Free Software Foundation, Inc., /* Abort program execution immediately */ -__NORETURN extern void fatal_error_fn( +NORETURN extern void fatal_error_fn( const char *msg, const char *file, unsigned int line, const char *function); #define FATAL_ERROR(msg) \ - fatal_error_fn((msg), __FILE__, __LINE__, __FUNCTION_NAME) + fatal_error_fn((msg), __FILE__, __LINE__, FUNCTION_NAME) #define FATAL_ERROR_IF(expr, msg) \ ((expr) \ - ? fatal_error_fn((msg), __FILE__, __LINE__, __FUNCTION_NAME) \ + ? fatal_error_fn((msg), __FILE__, __LINE__, FUNCTION_NAME) \ : (void)(0)) /* @@ -75,14 +71,14 @@ __NORETURN extern void fatal_error_fn( defined) */ -__NORETURN extern void sanity_check_fn( +NORETURN extern void sanity_check_fn( const char *assertion, const char *file, unsigned int line, const char *function); #define SANITY_CHECK(expr) \ ((expr) \ ? (void)(0) \ - : sanity_check_fn(#expr, __FILE__, __LINE__, __FUNCTION_NAME)) + : sanity_check_fn(#expr, __FILE__, __LINE__, FUNCTION_NAME)) #define sanity_check(expr) SANITY_CHECK(expr) diff --git a/src/emerge.cpp b/src/emerge.cpp index 1e40b915a..21f17cb0e 100644 --- a/src/emerge.cpp +++ b/src/emerge.cpp @@ -627,7 +627,7 @@ MapBlock *EmergeThread::finishGen(v3s16 pos, BlockMakeData *bmdata, void *EmergeThread::run() { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); BEGIN_DEBUG_EXCEPTION_HANDLER v3s16 pos; diff --git a/src/environment.cpp b/src/environment.cpp index 59159868e..88f25536f 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -70,7 +70,7 @@ Environment::~Environment() void Environment::addPlayer(Player *player) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); /* Check that peer_ids are unique. Also check that names are unique. @@ -982,7 +982,7 @@ void ServerEnvironment::clearAllObjects() void ServerEnvironment::step(float dtime) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); //TimeTaker timer("ServerEnv step"); @@ -2028,7 +2028,7 @@ ClientMap & ClientEnvironment::getClientMap() void ClientEnvironment::addPlayer(Player *player) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); /* It is a failure if player is local and there already is a local player @@ -2052,7 +2052,7 @@ LocalPlayer * ClientEnvironment::getLocalPlayer() void ClientEnvironment::step(float dtime) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); /* Step time of day */ stepTimeOfDay(dtime); diff --git a/src/httpfetch.cpp b/src/httpfetch.cpp index 979f11160..f10351a01 100644 --- a/src/httpfetch.cpp +++ b/src/httpfetch.cpp @@ -616,7 +616,7 @@ protected: void *run() { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); CurlHandlePool pool; diff --git a/src/inventory.cpp b/src/inventory.cpp index 67f979b13..e89993e63 100644 --- a/src/inventory.cpp +++ b/src/inventory.cpp @@ -126,7 +126,7 @@ ItemStack::ItemStack(std::string name_, u16 count_, void ItemStack::serialize(std::ostream &os) const { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); if(empty()) return; @@ -151,7 +151,7 @@ void ItemStack::serialize(std::ostream &os) const void ItemStack::deSerialize(std::istream &is, IItemDefManager *itemdef) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); clear(); diff --git a/src/inventorymanager.cpp b/src/inventorymanager.cpp index d4e8d2f25..5b29b6f17 100644 --- a/src/inventorymanager.cpp +++ b/src/inventorymanager.cpp @@ -886,7 +886,7 @@ bool getCraftingResult(Inventory *inv, ItemStack& result, std::vector &output_replacements, bool decrementInput, IGameDef *gamedef) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); result.clear(); diff --git a/src/map.cpp b/src/map.cpp index a2dbffe66..ceebd40a3 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1619,7 +1619,7 @@ void Map::transformLiquids(std::map & modified_blocks) INodeDefManager *nodemgr = m_gamedef->ndef(); - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); //TimeTaker timer("transformLiquids()"); u32 loopcount = 0; @@ -2118,7 +2118,7 @@ ServerMap::ServerMap(std::string savedir, IGameDef *gamedef, EmergeManager *emer m_emerge(emerge), m_map_metadata_changed(true) { - verbosestream<<__FUNCTION_NAME< &modified_blocks ) { - DSTACKF("%s: p=(%d,%d,%d)", __FUNCTION_NAME, p.X, p.Y, p.Z); + DSTACKF("%s: p=(%d,%d,%d)", FUNCTION_NAME, p.X, p.Y, p.Z); /*infostream<<"generateBlock(): " <<"("< &dst) void ServerMap::saveMapMeta() { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); createDirs(m_savedir); @@ -3016,7 +3016,7 @@ void ServerMap::saveMapMeta() void ServerMap::loadMapMeta() { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); Settings conf; std::string fullpath = m_savedir + DIR_DELIM + "map_meta.txt"; @@ -3041,7 +3041,7 @@ void ServerMap::loadMapMeta() void ServerMap::saveSectorMeta(ServerMapSector *sector) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); // Format used for writing u8 version = SER_FMT_VER_HIGHEST_WRITE; // Get destination @@ -3062,7 +3062,7 @@ void ServerMap::saveSectorMeta(ServerMapSector *sector) MapSector* ServerMap::loadSectorMeta(std::string sectordir, bool save_after_load) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); // Get destination v2s16 p2d = getSectorPos(sectordir); @@ -3103,7 +3103,7 @@ MapSector* ServerMap::loadSectorMeta(std::string sectordir, bool save_after_load bool ServerMap::loadSectorMeta(v2s16 p2d) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); // The directory layout we're going to load from. // 1 - original sectors/xxxxzzzz/ @@ -3145,7 +3145,7 @@ bool ServerMap::loadSectorMeta(v2s16 p2d) #if 0 bool ServerMap::loadSectorFull(v2s16 p2d) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); MapSector *sector = NULL; @@ -3284,7 +3284,7 @@ bool ServerMap::saveBlock(MapBlock *block, Database *db) void ServerMap::loadBlock(std::string sectordir, std::string blockfile, MapSector *sector, bool save_after_load) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); std::string fullpath = sectordir + DIR_DELIM + blockfile; try { @@ -3360,7 +3360,7 @@ void ServerMap::loadBlock(std::string sectordir, std::string blockfile, void ServerMap::loadBlock(std::string *blob, v3s16 p3d, MapSector *sector, bool save_after_load) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); try { std::istringstream is(*blob, std::ios_base::binary); @@ -3428,7 +3428,7 @@ void ServerMap::loadBlock(std::string *blob, v3s16 p3d, MapSector *sector, bool MapBlock* ServerMap::loadBlock(v3s16 blockpos) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); v2s16 p2d(blockpos.X, blockpos.Z); diff --git a/src/mapblock.cpp b/src/mapblock.cpp index be16c3bb7..f8747f52b 100644 --- a/src/mapblock.cpp +++ b/src/mapblock.cpp @@ -796,12 +796,12 @@ void MapBlock::deSerialize_pre22(std::istream &is, u8 version, bool disk) char tmp; is.read(&tmp, 1); if (is.gcount() != 1) - throw SerializationError(std::string(__FUNCTION_NAME) + throw SerializationError(std::string(FUNCTION_NAME) + ": not enough input data"); is_underground = tmp; is.read((char *)*databuf_nodelist, nodecount * ser_length); if ((u32)is.gcount() != nodecount * ser_length) - throw SerializationError(std::string(__FUNCTION_NAME) + throw SerializationError(std::string(FUNCTION_NAME) + ": not enough input data"); } else if (version <= 10) { u8 t8; @@ -814,7 +814,7 @@ void MapBlock::deSerialize_pre22(std::istream &is, u8 version, bool disk) decompress(is, os, version); std::string s = os.str(); if (s.size() != nodecount) - throw SerializationError(std::string(__FUNCTION_NAME) + throw SerializationError(std::string(FUNCTION_NAME) + ": not enough input data"); for (u32 i = 0; i < s.size(); i++) { databuf_nodelist[i*ser_length] = s[i]; @@ -826,7 +826,7 @@ void MapBlock::deSerialize_pre22(std::istream &is, u8 version, bool disk) decompress(is, os, version); std::string s = os.str(); if (s.size() != nodecount) - throw SerializationError(std::string(__FUNCTION_NAME) + throw SerializationError(std::string(FUNCTION_NAME) + ": not enough input data"); for (u32 i = 0; i < s.size(); i++) { databuf_nodelist[i*ser_length + 1] = s[i]; @@ -839,7 +839,7 @@ void MapBlock::deSerialize_pre22(std::istream &is, u8 version, bool disk) decompress(is, os, version); std::string s = os.str(); if (s.size() != nodecount) - throw SerializationError(std::string(__FUNCTION_NAME) + throw SerializationError(std::string(FUNCTION_NAME) + ": not enough input data"); for (u32 i = 0; i < s.size(); i++) { databuf_nodelist[i*ser_length + 2] = s[i]; @@ -859,7 +859,7 @@ void MapBlock::deSerialize_pre22(std::istream &is, u8 version, bool disk) decompress(is, os, version); std::string s = os.str(); if (s.size() != nodecount * 3) - throw SerializationError(std::string(__FUNCTION_NAME) + throw SerializationError(std::string(FUNCTION_NAME) + ": decompress resulted in size other than nodecount*3"); // deserialize nodes from buffer diff --git a/src/nodemetadata.cpp b/src/nodemetadata.cpp index 9c74dcd28..126889ecf 100644 --- a/src/nodemetadata.cpp +++ b/src/nodemetadata.cpp @@ -120,7 +120,7 @@ void NodeMetadataList::deSerialize(std::istream &is, IItemDefManager *item_def_m } if (version != 1) { - std::string err_str = std::string(__FUNCTION_NAME) + std::string err_str = std::string(FUNCTION_NAME) + ": version " + itos(version) + " not supported"; infostream << err_str << std::endl; throw SerializationError(err_str); diff --git a/src/script/lua_api/l_server.cpp b/src/script/lua_api/l_server.cpp index a6dac487b..6a8183088 100644 --- a/src/script/lua_api/l_server.cpp +++ b/src/script/lua_api/l_server.cpp @@ -110,7 +110,7 @@ int ModApiServer::l_get_player_ip(lua_State *L) } catch(con::PeerNotFoundException) // unlikely { - dstream << __FUNCTION_NAME << ": peer was not found" << std::endl; + dstream << FUNCTION_NAME << ": peer was not found" << std::endl; lua_pushnil(L); // error return 1; } @@ -136,7 +136,7 @@ int ModApiServer::l_get_player_information(lua_State *L) } catch(con::PeerNotFoundException) // unlikely { - dstream << __FUNCTION_NAME << ": peer was not found" << std::endl; + dstream << FUNCTION_NAME << ": peer was not found" << std::endl; lua_pushnil(L); // error return 1; } @@ -150,7 +150,7 @@ int ModApiServer::l_get_player_information(lua_State *L) #define ERET(code) \ if (!(code)) { \ - dstream << __FUNCTION_NAME << ": peer was not found" << std::endl; \ + dstream << FUNCTION_NAME << ": peer was not found" << std::endl; \ lua_pushnil(L); /* error */ \ return 1; \ } @@ -281,7 +281,7 @@ int ModApiServer::l_ban_player(lua_State *L) } catch(con::PeerNotFoundException) // unlikely { - dstream << __FUNCTION_NAME << ": peer was not found" << std::endl; + dstream << FUNCTION_NAME << ": peer was not found" << std::endl; lua_pushboolean(L, false); // error return 1; } diff --git a/src/server.cpp b/src/server.cpp index d6207538f..3aff2fb97 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -88,7 +88,7 @@ private: void *ServerThread::run() { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); BEGIN_DEBUG_EXCEPTION_HANDLER m_server->AsyncRunStep(true); @@ -433,7 +433,7 @@ Server::~Server() void Server::start(Address bind_addr) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); m_bind_addr = bind_addr; @@ -466,7 +466,7 @@ void Server::start(Address bind_addr) void Server::stop() { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); infostream<<"Server: Stopping and waiting threads"< 2.0) dtime = 2.0; @@ -509,7 +509,7 @@ void Server::step(float dtime) void Server::AsyncRunStep(bool initial_step) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); g_profiler->add("Server::AsyncRunStep (num)", 1); @@ -693,7 +693,7 @@ void Server::AsyncRunStep(bool initial_step) Player *player = m_env->getPlayer(client->peer_id); if(player == NULL) { // This can happen if the client timeouts somehow - /*warningstream<<__FUNCTION_NAME<<": Client " + /*warningstream<peer_id <<" has no associated player"<getSendType(); @@ -1021,7 +1021,7 @@ void Server::AsyncRunStep(bool initial_step) void Server::Receive() { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); SharedBuffer data; u16 peer_id; try { @@ -1158,7 +1158,7 @@ inline void Server::handleCommand(NetworkPacket* pkt) void Server::ProcessData(NetworkPacket *pkt) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); // Environment is locked first. MutexAutoLock envlock(m_env_mutex); @@ -1354,7 +1354,7 @@ void Server::SetBlocksNotSent(std::map& block) void Server::peerAdded(con::Peer *peer) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); verbosestream<<"Server::peerAdded(): peer->id=" <id<id=" <id<<", timeout="<getPlayer()); @@ -1624,7 +1624,7 @@ void Server::SendInventory(PlayerSAO* playerSAO) void Server::SendChatMessage(u16 peer_id, const std::wstring &message) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); NetworkPacket pkt(TOCLIENT_CHAT_MESSAGE, 0, peer_id); pkt << message; @@ -1640,7 +1640,7 @@ void Server::SendChatMessage(u16 peer_id, const std::wstring &message) void Server::SendShowFormspecMessage(u16 peer_id, const std::string &formspec, const std::string &formname) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); NetworkPacket pkt(TOCLIENT_SHOW_FORMSPEC, 0 , peer_id); @@ -1655,7 +1655,7 @@ void Server::SendSpawnParticle(u16 peer_id, v3f pos, v3f velocity, v3f accelerat float expirationtime, float size, bool collisiondetection, bool vertical, std::string texture) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); NetworkPacket pkt(TOCLIENT_SPAWN_PARTICLE, 0, peer_id); @@ -1677,7 +1677,7 @@ void Server::SendAddParticleSpawner(u16 peer_id, u16 amount, float spawntime, v3 v3f minvel, v3f maxvel, v3f minacc, v3f maxacc, float minexptime, float maxexptime, float minsize, float maxsize, bool collisiondetection, bool vertical, std::string texture, u32 id) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); NetworkPacket pkt(TOCLIENT_ADD_PARTICLESPAWNER, 0, peer_id); @@ -1699,7 +1699,7 @@ void Server::SendAddParticleSpawner(u16 peer_id, u16 amount, float spawntime, v3 void Server::SendDeleteParticleSpawner(u16 peer_id, u32 id) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); NetworkPacket pkt(TOCLIENT_DELETE_PARTICLESPAWNER_LEGACY, 2, peer_id); @@ -1809,7 +1809,7 @@ void Server::SendOverrideDayNightRatio(u16 peer_id, bool do_override, void Server::SendTimeOfDay(u16 peer_id, u16 time, f32 time_speed) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); NetworkPacket pkt(TOCLIENT_TIME_OF_DAY, 0, peer_id); pkt << time << time_speed; @@ -1824,7 +1824,7 @@ void Server::SendTimeOfDay(u16 peer_id, u16 time, f32 time_speed) void Server::SendPlayerHP(u16 peer_id) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); PlayerSAO *playersao = getPlayerSAO(peer_id); // In some rare case, if the player is disconnected // while Lua call l_punch, for example, this can be NULL @@ -1842,7 +1842,7 @@ void Server::SendPlayerHP(u16 peer_id) void Server::SendPlayerBreath(u16 peer_id) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); PlayerSAO *playersao = getPlayerSAO(peer_id); assert(playersao); @@ -1852,7 +1852,7 @@ void Server::SendPlayerBreath(u16 peer_id) void Server::SendMovePlayer(u16 peer_id) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); Player *player = m_env->getPlayer(peer_id); assert(player); @@ -2120,7 +2120,7 @@ void Server::setBlockNotSent(v3s16 p) void Server::SendBlockNoLock(u16 peer_id, MapBlock *block, u8 ver, u16 net_proto_version) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); v3s16 p = block->getPos(); @@ -2142,7 +2142,7 @@ void Server::SendBlockNoLock(u16 peer_id, MapBlock *block, u8 ver, u16 net_proto void Server::SendBlocks(float dtime) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); MutexAutoLock envlock(m_env_mutex); //TODO check if one big lock could be faster then multiple small ones @@ -2212,7 +2212,7 @@ void Server::SendBlocks(float dtime) void Server::fillMediaCache() { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); infostream<<"Server: Calculating media file checksums"< &tosend) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); verbosestream<<"Server::sendRequestedMedia(): " <<"Sending files to client"<::iterator i = m_detached_inventories.begin(); @@ -2494,7 +2494,7 @@ void Server::sendDetachedInventories(u16 peer_id) void Server::DiePlayer(u16 peer_id) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); PlayerSAO *playersao = getPlayerSAO(peer_id); assert(playersao); @@ -2514,7 +2514,7 @@ void Server::DiePlayer(u16 peer_id) void Server::RespawnPlayer(u16 peer_id) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); PlayerSAO *playersao = getPlayerSAO(peer_id); assert(playersao); @@ -2540,7 +2540,7 @@ void Server::RespawnPlayer(u16 peer_id) void Server::DenySudoAccess(u16 peer_id) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); NetworkPacket pkt(TOCLIENT_DENY_SUDO_MODE, 0, peer_id); Send(&pkt); @@ -2566,7 +2566,7 @@ void Server::DenyAccessVerCompliant(u16 peer_id, u16 proto_ver, AccessDeniedCode void Server::DenyAccess(u16 peer_id, AccessDeniedCode reason, const std::string &custom_reason) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); SendAccessDenied(peer_id, reason, custom_reason); m_clients.event(peer_id, CSE_SetDenied); @@ -2577,7 +2577,7 @@ void Server::DenyAccess(u16 peer_id, AccessDeniedCode reason, const std::string // the minimum version for MT users, maybe in 1 year void Server::DenyAccess_Legacy(u16 peer_id, const std::wstring &reason) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); SendAccessDenied_Legacy(peer_id, reason); m_clients.event(peer_id, CSE_SetDenied); @@ -2586,7 +2586,7 @@ void Server::DenyAccess_Legacy(u16 peer_id, const std::wstring &reason) void Server::acceptAuth(u16 peer_id, bool forSudoMode) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); if (!forSudoMode) { RemoteClient* client = getClient(peer_id, CS_Invalid); @@ -2617,7 +2617,7 @@ void Server::acceptAuth(u16 peer_id, bool forSudoMode) void Server::DeleteClient(u16 peer_id, ClientDeletionReason reason) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); std::wstring message; { /* @@ -2700,7 +2700,7 @@ void Server::DeleteClient(u16 peer_id, ClientDeletionReason reason) void Server::UpdateCrafting(Player* player) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); // Get a preview for crafting ItemStack preview; @@ -3388,7 +3388,7 @@ PlayerSAO* Server::emergePlayer(const char *name, u16 peer_id, u16 proto_version void dedicated_server_loop(Server &server, bool &kill) { - DSTACK(__FUNCTION_NAME); + DSTACK(FUNCTION_NAME); verbosestream<<"dedicated_server_loop()"<