Use relations_with() for getrel(NP, THEM) where NP isn't THEM

Replacing getrel(NP, THEM), where NP is known to be getnatp(US), by
relations_with(US, THEM) makes a difference only when US equals THEM.
Replace in places where it's obvious that they're not equal.

Adds a few calls to getnatp() hidden in relations_with().  Keeping
that optimized isn't worth it.
This commit is contained in:
Markus Armbruster 2011-02-06 10:27:45 +01:00
parent bdf63bc5fa
commit 6852ec6bc5
5 changed files with 6 additions and 6 deletions

View file

@ -245,9 +245,9 @@ share_incr(double *res, double *tech)
continue;
}
if (!opt_ALL_BLEED) {
if (getrel(np, j) != ALLIED)
if (relations_with(i, j) != ALLIED)
continue;
if (getrel(other, i) != ALLIED)
if (relations_with(j, i) != ALLIED)
continue;
res[i] += levels[j][NAT_RLEV];
tech[i] += levels[j][NAT_TLEV];