aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/tableview/gameoflife/main.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2018-08-06 11:51:56 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2018-08-09 07:51:16 +0000
commit024cb75206c0be123729c1fd1ddd99b634e0350f (patch)
tree9947472dbdb8e6138b9e36b77d9fd37efc825b95 /examples/quick/tableview/gameoflife/main.cpp
parentabba0b6e2c00df2df39ad16a20eba3870e68f252 (diff)
JS: Also have modulo return integer 0 when the lhs is 0
When both operands of a modulo are integers, and the right-hand side is bigger than zero, it is fine to have the left-hand side be 0, as the result is (positive) zero. This also handles the somewhat common case below, where lhs is 0, and where returning a double would result in the slow path to do the actual array access: array[lhs % array.length] Change-Id: I4ca268a08604c3c77a23a92eee193c807696d5ba Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'examples/quick/tableview/gameoflife/main.cpp')
0 files changed, 0 insertions, 0 deletions