splinter-build / splinter

A series of patches (one per branch) on top of the Ninja project's codebase. Updated periodically.
Apache License 2.0
6 stars 1 forks source link

Prefer pre-inc/dec over post-inc/dec. #17

Open shahzadlone opened 5 years ago

shahzadlone commented 5 years ago

Use pre-inc/pre-dec over post-inc/post-dec where ever don't need a post-inc/post-dec (some times you want to return the result of the value before the operation is applied, post operation is valid to use in that case).

Even on integral / primitive types where do not need a post-inc/post-dec, always inforce pre-incr/pre-dec for the sake of consistency.