mirror of https://github.com/OpenRCT2/OpenRCT2.git
Add const version of NewsItemQueue::At
This commit is contained in:
parent
b6d3868c9d
commit
502f11400e
|
@ -83,6 +83,11 @@ NewsItem& NewsItemQueue::operator[](size_t index)
|
|||
}
|
||||
|
||||
NewsItem* NewsItemQueue::At(int32_t index)
|
||||
{
|
||||
return const_cast<NewsItem*>(const_cast<const NewsItemQueue&>(*this).At(index));
|
||||
}
|
||||
|
||||
const NewsItem* NewsItemQueue::At(int32_t index) const
|
||||
{
|
||||
if (news_item_is_valid_idx(index))
|
||||
{
|
||||
|
|
|
@ -69,6 +69,7 @@ struct NewsItemQueue
|
|||
{
|
||||
NewsItem& operator[](size_t index);
|
||||
NewsItem* At(int32_t index);
|
||||
const NewsItem* At(int32_t index) const;
|
||||
bool IsEmpty() const;
|
||||
void Init();
|
||||
uint16_t IncrementTicks();
|
||||
|
|
Loading…
Reference in New Issue