mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-18 14:08:19 +00:00
Assert instead of returning empty event on invalid index
This commit is contained in:
parent
cdd19beee4
commit
8b26fa0bc3
|
@ -58,11 +58,7 @@ public:
|
|||
virtual bool IsEventValid(CEvent *pEvent) const = 0;
|
||||
CEvent GetEvent(int Index) const
|
||||
{
|
||||
if(Index < 0 || Index >= m_NumEvents)
|
||||
{
|
||||
IInput::CEvent e = {0, 0};
|
||||
return e;
|
||||
}
|
||||
dbg_assert(Index >= 0 && Index < m_NumEvents, "Index invalid");
|
||||
return m_aInputEvents[Index];
|
||||
}
|
||||
CEvent *GetEventsRaw() { return m_aInputEvents; }
|
||||
|
|
Loading…
Reference in a new issue