From: Fraser Waters Date: Thu, 5 Oct 2017 14:32:39 +0000 (+0100) Subject: Fix bug where count overrides didn't effect ComputeSize X-Git-Tag: v3.0.0~21^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=386d4e6a1930c1e76693bd7240aeeeeaf1db612c;p=platform%2Fcore%2Fcsapi%2Fopentk.git Fix bug where count overrides didn't effect ComputeSize ComputeSize and ElementCount should match each other (and they do when read direct from XML spec files). However when using the override file to change count only ElementCount was effected. This is now fixed so that ComputeSize is set and also so that ElementCount gets reset to 0 if the count value isn't an integer. --- diff --git a/src/Generator.Bind/FuncProcessor.cs b/src/Generator.Bind/FuncProcessor.cs index 7755f40e..c5ce9b52 100644 --- a/src/Generator.Bind/FuncProcessor.cs +++ b/src/Generator.Bind/FuncProcessor.cs @@ -536,11 +536,16 @@ namespace Bind d.Parameters[i].Flow = Parameter.GetFlowDirection((string)node.TypedValue); break; case "count": + d.Parameters[i].ComputeSize = node.Value.Trim(); int count; - if (Int32.TryParse(node.Value, out count)) + if (Int32.TryParse(d.Parameters[i].ComputeSize, out count)) { d.Parameters[i].ElementCount = count; } + else + { + d.Parameters[i].ElementCount = 0; + } break; } }