Code review comment for lp:~kxq/widelands/bug-1348800-forester_adds_weight

Revision history for this message
SirVer (sirver) wrote :

Sure.

> for (auto bsii
use const auto& to avoid reconstructing the tuple. for both loops. Please also add {} for the second for.

> Adding epsilon
I was not concerned about performance - this is not hot inner loop code anyways. I just didn't get it. In fact, I still do not get it - espilon() is 1e-18 or so, why does adding it turn choice into a positive number?

logic_rand_as_double always returns a positive number so it is probably not needed. I just want to understand it.

« Back to merge proposal