Red Gate forums :: View topic - Operator ++
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
.NET Reflector 7 EAP
.NET Reflector 7 EAP forum

Operator ++

Search in .NET Reflector 7 EAP forum
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Jump to:  
Author Message
alehandro



Joined: 16 Nov 2010
Posts: 35

PostPosted: Thu Jan 13, 2011 9:31 pm    Post subject: Operator ++ Reply with quote

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
Back to top
View user's profile Send private message
alehandro



Joined: 16 Nov 2010
Posts: 35

PostPosted: Sat Jan 29, 2011 11:02 am    Post subject: Reply with quote

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);
}
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies. All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group