1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-04-01 17:06:40 +00:00

Less complex "index" and "at"

This commit is contained in:
trav5 2024-04-27 15:22:19 +02:00
parent b9358521cc
commit 897e43ae1e

View file

@ -101,14 +101,14 @@ namespace
const ESM::Dialogue* at(size_t index) const
{
if (index >= getSize())
auto result = begin();
result += index;
if (result == end())
{
return nullptr;
}
auto result = begin();
result += index;
return &(*result);
}