mirror of https://github.com/OpenRCT2/OpenRCT2.git
Improve verifying validty of new game action
This commit is contained in:
parent
1dd5d3a3f5
commit
4841e2c6f3
|
@ -43,7 +43,7 @@ namespace GameActions
|
||||||
|
|
||||||
GameActionFactory Register(uint32 id, GameActionFactory factory)
|
GameActionFactory Register(uint32 id, GameActionFactory factory)
|
||||||
{
|
{
|
||||||
Guard::Assert(id < sizeof(_actions));
|
Guard::Assert(id < Util::CountOf(_actions));
|
||||||
Guard::ArgumentNotNull(factory);
|
Guard::ArgumentNotNull(factory);
|
||||||
|
|
||||||
_actions[id] = factory;
|
_actions[id] = factory;
|
||||||
|
|
Loading…
Reference in New Issue