[reSIProcate] Minor suggestion to use ++i instead of i++

Scott Godin slgodin at icescape.com
Fri Nov 5 07:55:35 CST 2004


Note:  At least on the VS.NET2003 compiler - it seems to do that
optimization for you.  As long as you are not using the value, the following
two lines are equivalent:
i++;
++i;


-----Original Message-----
From: Alan Hawrylyshen [mailto:alan at jasomi.com] 
Sent: Thursday, November 04, 2004 7:38 PM
To: kaiduan xie
Cc: resiprocate-devel at list.sipfoundry.org
Subject: Re: [reSIProcate] Minor suggestion to use ++i instead of i++


On Nov 4, 2004, at 15.58, kaiduan xie wrote:

> Hi, all,
>
> After reviewing the source code, I found a lot of
> places using i++ in loop of iterators, just to suggest
> use ++i instead. Thanks,
>
> kaiduan
>

I would tend to agree -- if you are editing some code that's doing an 
post-increment on an iterator, it's work changing to to pre-increment 
if there is no call for the value before incrementing.



>
a l a n a t j a s o m i d o t c o m

_______________________________________________
resiprocate-devel mailing list
resiprocate-devel at list.sipfoundry.org
https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel



More information about the resiprocate-devel mailing list