]> git.pond.sub.org Git - empserver/commitdiff
(SHOULD_PRODUCE): Silly. Simplify and inline at only call site.
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 19 Aug 2004 18:01:55 +0000 (18:01 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 19 Aug 2004 18:01:55 +0000 (18:01 +0000)
src/lib/update/sect.c

index 428104b9f73b2f7156a8b1035fbc6e93de5731cd..6b7c027f7f89fdb0c41b75dc0c897d1e4f0b8156 100644 (file)
@@ -314,8 +314,6 @@ decay_fallout(struct sctstr *sp, int etus)
     sp->sct_fallout = decay < sp->sct_fallout ? sp->sct_fallout - decay : 0;
 }
 
-#define SHOULD_PRODUCE(sp,t)   (((sp->sct_type == t) || (t == -1)) ? 1 : 0)
-
 /*
  * Produce only a set sector type for a specific nation
  * (or all, if sector_type == -1)
@@ -339,7 +337,7 @@ produce_sect(int natnum, int etu, int *bp, long int (*p_sect)[2],
            continue;
        if (sp->sct_updated != 0)
            continue;
-       if (!SHOULD_PRODUCE(sp, sector_type))
+       if (sp->sct_type != sector_type && sector_type != -1)
            continue;
 
        if ((sp->sct_type == SCT_CAPIT) && (sp->sct_effic > 60)) {