mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-09-17 20:24:24 +00:00
MIB compiler: Eliminate the need for a cast
This commit is contained in:
parent
987f0e3016
commit
b68e801975
@ -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);
|
||||
|
@ -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(",");
|
||||
|
Loading…
Reference in New Issue
Block a user