/in/simulation.cpp: In function 'bool readsummary(std::__cxx11::string, world_t&)':
/in/simulation.cpp:38:27: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if(speciesnumber+1>MAXSPECIES){
~~~~~~~~~~~~~~~^~~~~~~~~~~
/in/simulation.cpp: In function 'bool readspieces(std::__cxx11::string, std::__cxx11::string, species_t&)':
/in/simulation.cpp:81:28: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if(instructionnum+1>MAXPROGRAM){
~~~~~~~~~~~~~~~~^~~~~~~~~~~
/in/simulation.cpp: In function 'bool readworld(std::__cxx11::string, world_t&)':
/in/simulation.cpp:223:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if(numcreatures+1>MAXCREATURES){
~~~~~~~~~~~~~~^~~~~~~~~~~~~
/in/simulation.cpp: In function 'bool readcreatures(std::__cxx11::string, creature_t&, world_t&)':
/in/simulation.cpp:257:19: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int i=0;i<world.numSpecies;i++){
~^~~~~~~~~~~~~~~~~
/in/simulation.cpp:299:64: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if(writeincreature.location.r<0||writeincreature.location.r>=world.grid.height){
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:304:64: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if(writeincreature.location.c<0||writeincreature.location.r>=world.grid.width){
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/in/simulation.cpp:267:9: error: variable 'havedirection' set but not used [-Werror=unused-but-set-variable]
int havedirection=0;
^~~~~~~~~~~~~
/in/simulation.cpp: In function 'void printgrid(world_t&)':
/in/simulation.cpp:328:18: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for(int i=0;i<world.grid.height;i++){
~^~~~~~~~~~~~~~~~~~
/in/simulation.cpp:329:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for(int j=0;j<world.grid.width;j++){
~^~~~~~~~~~~~~~~~~
/in/simulation.cpp: In function 'void hop(creature_t&, grid_t&)':
/in/simulation.cpp:355:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
while(creature.location.c!=grid.width-1&&grid.squares[creature.location.r][creature.location.c+1]==nullptr){
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~
/in/simulation.cpp:369:34: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
while(creature.location.r!=grid.height-1&&grid.squares[creature.location.r+1][creature.location.c]==nullptr){
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/in/simulation.cpp: In function 'void infect(creature_t&, world_t&)':
/in/simulation.cpp:404:31: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if(creature.location.c!=world.grid.width-1&&world.grid.squares[creature.location.r][creature.location.c+1]!=nullptr&&world.grid.squares[creature.location.r][creature.location.c+1]->species!=creature.species){
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:414:31: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if(creature.location.c!=world.grid.height-1&&world.grid.squares[creature.location.r+1][creature.location.c]!=nullptr&&world.grid.squares[creature.location.r+1][creature.location.c]->species!=creature.species){
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In function 'bool ifempty(int, creature_t&, world_t&)':
/in/simulation.cpp:427:33: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if(creature.location.c+n>=world.grid.width){
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/in/simulation.cpp:451:33: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if(creature.location.r+n>=world.grid.height){
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In function 'bool ifwall(creature_t&, world_t&)':
/in/simulation.cpp:479:33: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if(creature.location.c+1>=world.grid.width){
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/in/simulation.cpp:491:33: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if(creature.location.r+1>=world.grid.height){
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In function 'bool ifsame(creature_t&, world_t&)':
/in/simulation.cpp:507:33: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if(creature.location.c+1>=world.grid.width){
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/in/simulation.cpp:531:33: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if(creature.location.r+1>=world.grid.height){
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In function 'bool ifenemy(creature_t&, world_t&)':
/in/simulation.cpp:559:33: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if(creature.location.c+1>=world.grid.width){
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
/in/simulation.cpp:583:33: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if(creature.location.r+1>=world.grid.height){
~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In function 'void runroundcon(world_t&)':
/in/simulation.cpp:610:18: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for(int i=0;i<world.numCreatures;i++){
~^~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In function 'void runroundver(world_t&)':
/in/simulation.cpp:694:18: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for(int i=0;i<world.numCreatures;i++){
~^~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors