diff --git a/include/nat.h b/include/nat.h index c0e5fdd1..a1700ced 100644 --- a/include/nat.h +++ b/include/nat.h @@ -200,7 +200,6 @@ extern double techfact(int level, double mult); /* src/lib/common/nat.c */ extern char *cname(natid n); extern char *natstate(struct natstr *np); -extern enum relations getrel(struct natstr *np, natid them); extern enum relations relations_with(natid, natid); extern char *relations_string(enum relations); extern int nat_accepts(natid, natid, enum rej_comm); diff --git a/src/lib/commands/rela.c b/src/lib/commands/rela.c index 4f505457..9fe1946e 100644 --- a/src/lib/commands/rela.c +++ b/src/lib/commands/rela.c @@ -43,7 +43,6 @@ int rela(void) { - struct natstr *natp; struct natstr *np; natid cn; natid as; @@ -56,7 +55,6 @@ rela(void) return RET_SYN; as = (natid)n; } - natp = getnatp(as); pr("\t%s Diplomatic Relations Report\t", cname(as)); prdate(); pr("\n Formal Relations %5s theirs\n", @@ -76,8 +74,8 @@ rela(void) } pr("%3d) %-20.20s ", cn, cname(cn)); pr("%-10s %s\n", - relations_string(getrel(natp, cn)), - relations_string(getrel(np, as))); + relations_string(relations_with(as, cn)), + relations_string(relations_with(cn, as))); } return RET_OK; } diff --git a/src/lib/common/nat.c b/src/lib/common/nat.c index ecaffe90..b51eb66f 100644 --- a/src/lib/common/nat.c +++ b/src/lib/common/nat.c @@ -61,13 +61,6 @@ natstate(struct natstr *np) return stnam[np->nat_stat]; } -/* This returns the relations that np has with them */ -enum relations -getrel(struct natstr *np, natid them) -{ - return np->nat_relate[them]; -} - /* * Return relations @us has with @them. * Countries are considered allied to themselves. @@ -75,7 +68,7 @@ getrel(struct natstr *np, natid them) enum relations relations_with(natid us, natid them) { - return us == them ? ALLIED : getrel(getnatp(us), them); + return us == them ? ALLIED : getnatp(us)->nat_relate[them]; } char *