mirror of
https://github.com/mariiaan/minipp.git
synced 2026-05-14 10:11:17 +02:00
Add const array accessor
This commit is contained in:
@@ -187,6 +187,13 @@ namespace minipp
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
return m_values[index];
|
return m_values[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Value* operator[](size_t index) const noexcept
|
||||||
|
{
|
||||||
|
if (index >= m_values.size())
|
||||||
|
return nullptr;
|
||||||
|
return m_values[index];
|
||||||
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user