Weaver: GetSyncVarStart simplified

This commit is contained in:
vis2k 2021-09-20 19:17:08 +08:00
parent e755c2ad9a
commit 9f4cf44217

View File

@ -19,12 +19,8 @@ public class SyncVarAccessLists
// amount of SyncVars per class. dict<className, amount>
public Dictionary<string, int> numSyncVars = new Dictionary<string, int>();
public int GetSyncVarStart(string className)
{
return numSyncVars.ContainsKey(className)
? numSyncVars[className]
: 0;
}
public int GetSyncVarStart(string className) =>
numSyncVars.TryGetValue(className, out int value) ? value : 0;
public void SetNumSyncVars(string className, int num)
{