Operator ++

Explore, browse and analyze .NET assemblies

Moderators: Luke Jefferson, Clive Tong, nick.maidment

Operator ++

Postby alehandro » Thu Jan 13, 2011 9:31 pm

instead of formatting source as

case 14:
return (structc5 = op_Decrement(structc5));

would be much better to decode as

case 14:
return ++structc5;

where structc5 is a local var on stack
alehandro
 
Posts: 35
Joined: Tue Nov 16, 2010 12:08 am

Postby alehandro » Sat Jan 29, 2011 11:02 am

any comments here?

OK, I'll show the code below (not compilable) and how I fixed it (after):

before
struct09c structc5 = structcArray[0];
.......
case 13:
return (structc5 = op_Increment(structc5));

case 14:
return (structc5 = op_Decrement(structc5));


after

case 13:
return ++structc5;

case 14:
return --structc5;



struct09c is rather complex, but is has the operators:
eg:

public static struct09c operator ++(struct09c p0)
{
return (p0 + f0002c5);
}

public static struct09c operator --(struct09c p0)
{
return (p0 - f0002c5);
}
alehandro
 
Posts: 35
Joined: Tue Nov 16, 2010 12:08 am


Return to .NET Reflector 7 EAP

Who is online

Users browsing this forum: No registered users and 0 guests