From 9ef34701d9cb7fcd0f00b2bf4c610ddf30bd9601 Mon Sep 17 00:00:00 2001 From: Paul Pacheco Date: Sun, 11 Aug 2019 12:53:21 -0700 Subject: [PATCH] refactor: cmdDelegate dictionary should be readonly --- Assets/Mirror/Runtime/NetworkBehaviour.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Assets/Mirror/Runtime/NetworkBehaviour.cs b/Assets/Mirror/Runtime/NetworkBehaviour.cs index 8b6739be0..d8fa1e61c 100644 --- a/Assets/Mirror/Runtime/NetworkBehaviour.cs +++ b/Assets/Mirror/Runtime/NetworkBehaviour.cs @@ -352,7 +352,7 @@ protected class Invoker public CmdDelegate invokeFunction; } - static Dictionary cmdHandlerDelegates = new Dictionary(); + static readonly Dictionary cmdHandlerDelegates = new Dictionary(); // helper function register a Command/Rpc/SyncEvent delegate [EditorBrowsable(EditorBrowsableState.Never)]