From 4046a4c4bd27a800c28431b2e4f52a635f8f9fc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20G=2E=20Aragoneses?= Date: Fri, 23 Aug 2013 22:02:16 +0200 Subject: [PATCH] generator: avoid double lookup in dictionary when DeAlias is called We can avoid a double lookup in the types dictionary here because the method TryGetValue() was just called before. --- generator/SymbolTable.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/SymbolTable.cs b/generator/SymbolTable.cs index 7effc54a0..7981a7744 100644 --- a/generator/SymbolTable.cs +++ b/generator/SymbolTable.cs @@ -213,7 +213,7 @@ namespace GtkSharp.Generation { type = Trim (type); IGeneratable cur_type = null; while (types.TryGetValue (type, out cur_type) && cur_type is AliasGen) { - IGeneratable igen = types [type] as AliasGen; + IGeneratable igen = cur_type as AliasGen; types [type] = types [igen.Name]; type = igen.Name; }