MIB compiler: Eliminate the need for a cast

This commit is contained in:
Dirk Ziegelmeier 2016-01-11 10:32:33 +01:00
parent 987f0e3016
commit b68e801975
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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(",");