Replaced boost::adaptor::reverse with reverse iterators

Changes based on f0f6f61cab
dev
Tomasz Kapuściński 2023-08-15 02:51:28 +02:00
parent b296ee4d47
commit 0ab9ae4b6e
1 changed files with 6 additions and 4 deletions

View File

@ -45,8 +45,6 @@
#include "ui/controls/target.h"
#include "ui/controls/window.h"
#include <boost/range/adaptor/reversed.hpp>
namespace Ui
{
@ -305,8 +303,10 @@ bool CInterface::EventProcess(const Event &event)
m_engine->SetMouseType(Gfx::ENG_MOUSE_NORM);
}
for (auto& control : boost::adaptors::reverse(m_controls))
for (auto it = m_controls.rbegin(); it != m_controls.rend(); ++it)
{
auto& control = *it;
if (control != nullptr && control->TestState(STATE_ENABLE))
{
if (! control->EventProcess(event))
@ -322,8 +322,10 @@ bool CInterface::EventProcess(const Event &event)
bool CInterface::GetTooltip(const glm::vec2& pos, std::string &name)
{
for (auto& control : boost::adaptors::reverse(m_controls))
for (auto it = m_controls.rbegin(); it != m_controls.rend(); ++it)
{
auto& control = *it;
if (control != nullptr)
{
if (control->GetTooltip(pos, name))