kleine Beschleunigung in lastregion, evtl. vernachlässigbar..

This commit is contained in:
Enno Rehling 2004-01-19 20:37:39 +00:00
parent 0f2f7f7b62
commit 44faa4e2fd
3 changed files with 4 additions and 4 deletions

View File

@ -1865,8 +1865,8 @@ region *
lastregion (faction * f) lastregion (faction * f)
{ {
region *r = f->last; region *r = f->last;
if (!r && f->units) { if (r==NULL && f->units!=NULL) {
for (r = firstregion(f); r; r = r->next) { for (r = f->units->region; r; r = r->next) {
plane * p = rplane(r); plane * p = rplane(r);
unit *u; unit *u;
attrib *ru; attrib *ru;

View File

@ -84,7 +84,7 @@ a_select(attrib * a, const void * data, boolean(*compare)(const attrib *, const
} }
attrib * attrib *
a_find(attrib * a, const attrib_type * at) a_find(attrib * a, const attrib_type * at)
{ {
while (a && a->type!=at) a = a->next; while (a && a->type!=at) a = a->next;
return a; return a;

View File

@ -27,7 +27,7 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#define NRT_MAXHASH 256 #define NRT_MAXHASH 1023
static nrmessage_type * messagetypes[NRT_MAXHASH]; static nrmessage_type * messagetypes[NRT_MAXHASH];
const char * const char *