On Mon, Dec 20, 2010 at 7:20 AM, Per Inge Mathisen <per.mathi...@gmail.com> wrote: > This is a patch to fix warnings discovered on a MacOSX compile with > llvm. Of note, look especially at the change in display.c, where > behaviour is altered. Zarel, I think you touched this line last, but I > failed to git blame past the file renames.
Ugh, no, I misread that code when I touched that line. The semicolon there is intentional; it's Pumpkin's one-liner search. The code originally looked like this: for (i=0;(i<numStructureStats)&&(asStructureStats[i].type != REF_RESOURCE_EXTRACTOR);i++); // find resource stat if( (i < numStructureStats) && (apStructTypeLists[selectedPlayer][i] == UNAVAILABLE)) // check if you can build it! { item = MT_BLOCKING; // don't allow build pointer. } What it's doing is this: // find resource stat i=0; while (i<numStructureStats && asStructureStats[i].type != REF_RESOURCE_EXTRACTOR) { i++; } // check if you can build it! if(i < numStructureStats && apStructTypeLists[selectedPlayer][i] == UNAVAILABLE) { item = MT_BLOCKING; // don't allow build pointer. } -Zarel _______________________________________________ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev