From ee1ba1728e2b887521fc677be6c3a77a7115d0e3 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sun, 19 Feb 2017 18:37:20 +0200 Subject: [PATCH] [Server] Rename getCellByID() into getCellByName() to avoid confusion --- apps/openmw-mp/Cell.cpp | 8 ++++---- apps/openmw-mp/Cell.hpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/openmw-mp/Cell.cpp b/apps/openmw-mp/Cell.cpp index c2e7d94fe..a0a2f8340 100644 --- a/apps/openmw-mp/Cell.cpp +++ b/apps/openmw-mp/Cell.cpp @@ -81,10 +81,10 @@ Cell *CellController::getCellByXY(int x, int y) return *it; } -Cell *CellController::getCellByID(std::string cellid) +Cell *CellController::getCellByName(std::string cellName) { - auto it = find_if(cells.begin(), cells.end(), [cellid](const Cell *c) { - return c->cell.mName == cellid; + auto it = find_if(cells.begin(), cells.end(), [cellName](const Cell *c) { + return c->cell.mName == cellName; }); if (it == cells.end()) return nullptr; @@ -169,7 +169,7 @@ void CellController::update(Player *player) LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Player %s (%d) unloaded cell: %s", player->npc.mName, player->getId(), cell.cell.getDescription().c_str()); Cell *c; if (!cell.cell.isExterior()) - c = getCellByID(cell.cell.mName); + c = getCellByName(cell.cell.mName); else c = getCellByXY(cell.cell.getGridX(), cell.cell.getGridY()); diff --git a/apps/openmw-mp/Cell.hpp b/apps/openmw-mp/Cell.hpp index 758a9fa33..175351016 100644 --- a/apps/openmw-mp/Cell.hpp +++ b/apps/openmw-mp/Cell.hpp @@ -35,7 +35,7 @@ public: void deletePlayer(Player *player); Cell *getCellByXY(int x, int y); - Cell *getCellByID(std::string cellid); + Cell *getCellByName(std::string cellName); void update(Player *player);