From db06497c1e7d6a3e34594673ddceca9c455335a8 Mon Sep 17 00:00:00 2001 From: vis2k Date: Tue, 1 Jan 2019 15:39:38 +0100 Subject: [PATCH] Weaver: simplify GetSyncVarStart --- Mirror/Weaver/Weaver.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Mirror/Weaver/Weaver.cs b/Mirror/Weaver/Weaver.cs index 731eca985..e26e802be 100644 --- a/Mirror/Weaver/Weaver.cs +++ b/Mirror/Weaver/Weaver.cs @@ -227,13 +227,9 @@ public static void DLog(TypeDefinition td, string fmt, params object[] args) public static int GetSyncVarStart(string className) { - if (lists.numSyncVars.ContainsKey(className)) - { - int num = lists.numSyncVars[className]; - return num; - } - // start at zero - return 0; + return lists.numSyncVars.ContainsKey(className) + ? lists.numSyncVars[className] + : 0; } public static void SetNumSyncVars(string className, int num)