Krazy: prefix vs. postfix ++ and -- operators
Torsten Rahn
torsten at kde.org
Tue Jan 11 16:53:09 GMT 2011
On Tuesday, 11. January 2011 16:16:23 Christoph Feck wrote:
>
> Is this krazy warning still correct?
>
> Christoph Feck (kdepepo)
Use preincrement whenever possible. Not only does this policy ensure that your
code stays efficient (if the compiler isn't able to to optimize it away).
It also accurately does what you mean. See the discussion box in Herb Sutter's
"Exceptional C++", page 20:
http://books.google.de/books?id=58rZvOSuheEC&lpg=PA20&ots=LZSfjxnWOj&dq=Herb%20Sutter%20Postincrement%20Preincrement&pg=PA21#v=onepage&q&f=false
Regards,
Torsten
More information about the kde-core-devel
mailing list