From 74822fb42f7b3b0ae9b23cdf94016f252ef805e1 Mon Sep 17 00:00:00 2001 From: Fraser Waters Date: Wed, 4 Oct 2017 20:00:53 +0100 Subject: [PATCH] Removing some dead code in Bind This change doesn't effect the output of Bind. --- src/Generator.Bind/XmlSpecReader.cs | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/Generator.Bind/XmlSpecReader.cs b/src/Generator.Bind/XmlSpecReader.cs index 67e72648..7907dfe3 100644 --- a/src/Generator.Bind/XmlSpecReader.cs +++ b/src/Generator.Bind/XmlSpecReader.cs @@ -304,21 +304,14 @@ namespace Bind p.CurrentType = param.GetAttribute("type", String.Empty).Trim(); p.Name = param.GetAttribute("name", String.Empty).Trim(); - string element_count = param.GetAttribute("elementcount", String.Empty).Trim(); - if (String.IsNullOrEmpty(element_count)) + p.ComputeSize = param.GetAttribute("count", String.Empty).Trim(); + + int elementCount; + if (Int32.TryParse(p.ComputeSize, out elementCount)) { - element_count = param.GetAttribute("count", String.Empty).Trim(); - if (!String.IsNullOrEmpty(element_count)) - { - int count; - if (Int32.TryParse(element_count, out count)) - { - p.ElementCount = count; - } - } + p.ElementCount = elementCount; } - p.ComputeSize = param.GetAttribute("count", String.Empty).Trim(); p.Flow = Parameter.GetFlowDirection(param.GetAttribute("flow", String.Empty).Trim()); d.Parameters.Add(p);