From 7d19b52a15af3e5ca61d150f5eeac604a30d354e Mon Sep 17 00:00:00 2001 From: Ramon Bernardo Date: Fri, 15 Oct 2021 06:17:11 -0300 Subject: [PATCH] Replace boost::adaptors::reverse with std::vector::reverse --- src/protocolgame.cpp | 5 ++--- src/tile.cpp | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/protocolgame.cpp b/src/protocolgame.cpp index f97623f2e0..3db0b0b436 100644 --- a/src/protocolgame.cpp +++ b/src/protocolgame.cpp @@ -19,8 +19,6 @@ #include "otpch.h" -#include - #include "protocolgame.h" #include "outputmessage.h" @@ -621,7 +619,8 @@ void ProtocolGame::GetTileDescription(const Tile* tile, NetworkMessage& msg) const CreatureVector* creatures = tile->getCreatures(); if (creatures) { - for (const Creature* creature : boost::adaptors::reverse(*creatures)) { + for (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) { + const Creature* creature = (*it); if (!player->canSeeCreature(creature)) { continue; } diff --git a/src/tile.cpp b/src/tile.cpp index 9b75a4f7d7..3690305cf4 100644 --- a/src/tile.cpp +++ b/src/tile.cpp @@ -19,8 +19,6 @@ #include "otpch.h" -#include - #include "tile.h" #include "creature.h" @@ -1218,7 +1216,8 @@ int32_t Tile::getClientIndexOfCreature(const Player* player, const Creature* cre } if (const CreatureVector* creatures = getCreatures()) { - for (const Creature* c : boost::adaptors::reverse(*creatures)) { + for (auto it = creatures->rbegin(), end = creatures->rend(); it != end; ++it) { + const Creature* c = (*it); if (c == creature) { return n; } else if (player->canSeeCreature(c)) {