From b68e8019755f7b7957bc541d9de5fb6b09892a60 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Mon, 11 Jan 2016 10:32:33 +0100 Subject: [PATCH] MIB compiler: Eliminate the need for a cast --- src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs | 2 +- .../snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs index 6c22036c..008b5ecc 100644 --- a/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs +++ b/src/apps/snmp/LwipMibCompiler/LwipMibCompiler/Program.cs @@ -118,7 +118,7 @@ namespace LwipMibCompiler SnmpMib snmpMib = new SnmpMib(); snmpMib.Oid = mibTreeNode.Entity.Value; - snmpMib.BaseOid = (int[])(object)MibTypesResolver.ResolveOid(mibTreeNode.Entity).GetOidValues(); + snmpMib.BaseOid = MibTypesResolver.ResolveOid(mibTreeNode.Entity).GetOidValues(); snmpMib.Name = mibTreeNode.Entity.Name; ProcessMibTreeNode(mibTreeNode, snmpMib); diff --git a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs index f3c027ea..e54aa343 100644 --- a/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs +++ b/src/apps/snmp/LwipMibCompiler/LwipSnmpCodeGeneration/SnmpMib.cs @@ -38,14 +38,14 @@ namespace LwipSnmpCodeGeneration { public class SnmpMib : SnmpTreeNode { - public int[] BaseOid { get; set; } + public uint[] BaseOid { get; set; } public SnmpMib() : base(null) { } - public SnmpMib(int[] baseOid) + public SnmpMib(uint[] baseOid) : base(null) { this.BaseOid = baseOid; @@ -64,7 +64,7 @@ namespace LwipSnmpCodeGeneration // create and add BaseOID declarations StringBuilder boidInitialization = new StringBuilder("{"); - foreach (int t in this.BaseOid) + foreach (uint t in this.BaseOid) { boidInitialization.Append(t); boidInitialization.Append(",");