From 443c0ed309934b663481a24a96bf1494ccc4763b Mon Sep 17 00:00:00 2001 From: Koncord Date: Wed, 22 Feb 2017 12:03:03 +0800 Subject: [PATCH] [Server] Fix Cell iterators --- apps/openmw-mp/Cell.cpp | 4 ++-- apps/openmw-mp/Cell.hpp | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/openmw-mp/Cell.cpp b/apps/openmw-mp/Cell.cpp index caaf3eb7e..79d6fc98c 100644 --- a/apps/openmw-mp/Cell.cpp +++ b/apps/openmw-mp/Cell.cpp @@ -212,12 +212,12 @@ Cell::Cell(ESM::Cell cell): cell(cell) } -Cell::Iterator Cell::begin() +Cell::Iterator Cell::begin() const { return players.begin(); } -Cell::Iterator Cell::end() +Cell::Iterator Cell::end() const { return players.end(); } diff --git a/apps/openmw-mp/Cell.hpp b/apps/openmw-mp/Cell.hpp index 938aa0a55..5ddeddbb4 100644 --- a/apps/openmw-mp/Cell.hpp +++ b/apps/openmw-mp/Cell.hpp @@ -53,10 +53,10 @@ class Cell public: Cell(ESM::Cell cell); typedef std::deque TPlayers; - typedef TPlayers::iterator Iterator; - - Iterator begin(); - Iterator end(); + typedef TPlayers::const_iterator Iterator; + + Iterator begin() const; + Iterator end() const; void addPlayer(Player *player); void removePlayer(Player *player);