From c443ad0cc0d6d7b72a787fd0124f33fbd1b388f0 Mon Sep 17 00:00:00 2001 From: LORDofDOOM Date: Thu, 22 Mar 2018 04:01:20 +0100 Subject: [PATCH] [Core] Changed type check as suggested by @knocte --- TeleSharp.TL/TLContext.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/TeleSharp.TL/TLContext.cs b/TeleSharp.TL/TLContext.cs index 8550c28..f13d83e 100644 --- a/TeleSharp.TL/TLContext.cs +++ b/TeleSharp.TL/TLContext.cs @@ -20,11 +20,7 @@ namespace TeleSharp.TL where t.IsSubclassOf(typeof(TLObject)) where t.GetCustomAttribute(typeof(TLObjectAttribute)) != null select t).ToDictionary(x => ((TLObjectAttribute)x.GetCustomAttribute(typeof(TLObjectAttribute))).Constructor, x => x); - - if (!Types.ContainsKey(481674261)) - { - Types.Add(481674261, typeof(TLVector<>)); - } + Types[481674261] = typeof(TLVector<>); } public static Type getType(int Constructor) {