]> git.pond.sub.org Git - empserver/commitdiff
relations: Inline putrel() into its only caller setrel()
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 31 Oct 2016 13:17:27 +0000 (14:17 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 18:09:21 +0000 (20:09 +0200)
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
include/nat.h
src/lib/common/nat.c
src/lib/subs/rej.c

index 017778c58ffd34f06639f9dfdf6ab705455e50fe..6c85ca333c31711450c6457be7c55fe14b40a320 100644 (file)
@@ -201,7 +201,6 @@ extern int getrel(struct natstr *np, natid them);
 extern int relations_with(natid, natid);
 extern int nat_accepts(natid, natid, enum rej_comm);
 extern int in_contact(natid, natid);
-extern void putrel(struct natstr *np, natid them, int relate);
 extern void agecontact(struct natstr *np);
 extern int influx(struct natstr *np);
 extern struct natstr *nat_reset(struct natstr *, natid, char *, char *,
index 8ed75cc4d3481ce29cccdd8eea5dcb3dabf1676d..0760816540839630eb623431fb53eadfe42defbc 100644 (file)
@@ -116,12 +116,6 @@ in_contact(natid us, natid them)
     return getcontactp(us)->con_contact[them];
 }
 
-void
-putrel(struct natstr *np, natid them, int relate)
-{
-    np->nat_relate[them] = relate;
-}
-
 int
 influx(struct natstr *np)
 {
index 4135b3b0b2c7f5798d2ba2ed589591a85fbb0569..699ad38aebd7999eedf202fddbedd851a9473539 100644 (file)
@@ -92,7 +92,7 @@ setrel(natid us, natid them, int rel)
            "Country %s has %s their relations with you to \"%s\"!\n",
            prnat(mynp), whichway, relates[rel]);
 
-    putrel(mynp, them, rel);
+    mynp->nat_relate[them] = rel;
     putnat(mynp);
 
     if (!player->god) {