/in/simulation.cpp: In member function 'void simulation::species_creature_initialize()':
/in/simulation.cpp:62:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int i = 0; i < this->world.numSpecies; i++){
~~^~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In member function 'void simulation::creature_initialize()':
/in/simulation.cpp:129:24: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (r < 0 || r >= this->world.grid.height || c < 0 || c >= this->world.grid.width){
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:129:65: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (r < 0 || r >= this->world.grid.height || c < 0 || c >= this->world.grid.width){
~~^~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:133:27: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int i = 0; i < this->world.numCreatures; i++){
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:146:27: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int i = 0; i < this->world.numSpecies; i++){
~~^~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:151:19: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (i == this->world.numSpecies-1){
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In member function 'void simulation::grid_initialize()':
/in/simulation.cpp:167:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int i = 0; i < this->world.grid.height; i++){
~~^~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:168:27: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int j = 0; j < this->world.grid.width; j++){
~~^~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:172:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int i = 0; i < this->world.numCreatures; i++){
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In member function 'void simulation::hop(const int&)':
/in/simulation.cpp:183:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (c+1 < this->world.grid.width && this->world.grid.squares[r][c+1] == NULL){
~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:189:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (r+1 < this->world.grid.height && this->world.grid.squares[r+1][c] == NULL){
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In member function 'void simulation::infect(const int&)':
/in/simulation.cpp:239:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (c+1 < this->world.grid.width && this->world.grid.squares[r][c+1] != NULL){
~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:244:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (r+1 < this->world.grid.height && this->world.grid.squares[r+1][c] != NULL){
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In member function 'void simulation::ifempty(const int&, const int&)':
/in/simulation.cpp:280:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (c+1 < this->world.grid.width && this->world.grid.squares[r][c+1] == NULL) go(index, step);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:283:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (r+1 < this->world.grid.height && this->world.grid.squares[r+1][c] == NULL) go(index, step);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In member function 'void simulation::ifwall(const int&, const int&)':
/in/simulation.cpp:303:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (c+1 >= this->world.grid.width) go(index, step);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:306:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (r+1 >= this->world.grid.height) go(index, step);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In member function 'void simulation::ifsame(const int&, const int&)':
/in/simulation.cpp:326:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (c+1 < this->world.grid.width && this->world.grid.squares[r][c+1] != NULL && this->world.grid.squares[r][c+1]->species == this->world.creatures[index].species) go(index, step);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:329:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (r+1 < this->world.grid.height && this->world.grid.squares[r+1][c] != NULL && this->world.grid.squares[r+1][c]->species == this->world.creatures[index].species) go(index, step);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In member function 'void simulation::ifenemy(const int&, const int&)':
/in/simulation.cpp:349:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (c+1 < this->world.grid.width && this->world.grid.squares[r][c+1] != NULL && this->world.grid.squares[r][c+1]->species != this->world.creatures[index].species) go(index, step);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:352:17: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (r+1 < this->world.grid.height && this->world.grid.squares[r+1][c] != NULL && this->world.grid.squares[r+1][c]->species != this->world.creatures[index].species) go(index, step);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In member function 'void simulation::round_simulation_verbose()':
/in/simulation.cpp:371:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int i = 0; i < this->world.numCreatures; i++){
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In member function 'void simulation::round_simulation_concise()':
/in/simulation.cpp:416:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int i = 0; i < this->world.numCreatures; i++){
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In member function 'void simulation::print_simulation() const':
/in/simulation.cpp:461:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int i = 0; i < this->world.numSpecies; i++){
~~^~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:464:27: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int j = 0; j < this->world.species[i].programSize; j++){
~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:469:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int i = 0; i < this->world.numCreatures; i++){
~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:473:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int i = 0; i < this->world.grid.height; i++){
~~^~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:474:27: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int j = 0; j < this->world.grid.width; j++){
~~^~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In member function 'void simulation::grid_print() const':
/in/simulation.cpp:488:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int i = 0; i < this->world.grid.height; i++){
~~^~~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp:489:27: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
for (int j = 0; j < this->world.grid.width; j++){
~~^~~~~~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In member function 'void simulation::error_publisher(const error_name&) const':
/in/simulation.cpp:503:12: error: enumeration value 'FAIL_FILE' not handled in switch [-Werror=switch]
switch (error){
^
/in/simulation.cpp:503:12: error: enumeration value 'TOO_MANY_INSTRUCTIONS' not handled in switch [-Werror=switch]
/in/simulation.cpp:503:12: error: enumeration value 'UNKNOWN_INSTRUCTION' not handled in switch [-Werror=switch]
/in/simulation.cpp:503:12: error: enumeration value 'SPECIES_NOT_FOUND' not handled in switch [-Werror=switch]
/in/simulation.cpp:503:12: error: enumeration value 'DIRECTION_NOT_RECORNIZED' not handled in switch [-Werror=switch]
/in/simulation.cpp:503:12: error: enumeration value 'OUT_OF_BOUNDS' not handled in switch [-Werror=switch]
/in/simulation.cpp:503:12: error: enumeration value 'OCCUPIED_SQUARE' not handled in switch [-Werror=switch]
/in/simulation.cpp: In member function 'void simulation::error_publisher(const error_name&, const string&) const':
/in/simulation.cpp:530:12: error: enumeration value 'MISSING_ARG' not handled in switch [-Werror=switch]
switch (error){
^
/in/simulation.cpp:530:12: error: enumeration value 'NEGATIVE_ROUNDS' not handled in switch [-Werror=switch]
/in/simulation.cpp:530:12: error: enumeration value 'TOO_MANY_SPECIES' not handled in switch [-Werror=switch]
/in/simulation.cpp:530:12: error: enumeration value 'TOO_MANY_CREATURES' not handled in switch [-Werror=switch]
/in/simulation.cpp:530:12: error: enumeration value 'GRID_HEIGHT_IS_ILLEGAL' not handled in switch [-Werror=switch]
/in/simulation.cpp:530:12: error: enumeration value 'GRID_WIDTH_IS_ILLEGAL' not handled in switch [-Werror=switch]
/in/simulation.cpp:530:12: error: enumeration value 'OUT_OF_BOUNDS' not handled in switch [-Werror=switch]
/in/simulation.cpp:530:12: error: enumeration value 'OCCUPIED_SQUARE' not handled in switch [-Werror=switch]
/in/simulation.cpp: In member function 'void simulation::error_publisher(const error_name&, const string&, const string&, const int&, const int&, const int&, const int&) const':
/in/simulation.cpp:551:12: error: enumeration value 'MISSING_ARG' not handled in switch [-Werror=switch]
switch (error){
^
/in/simulation.cpp:551:12: error: enumeration value 'NEGATIVE_ROUNDS' not handled in switch [-Werror=switch]
/in/simulation.cpp:551:12: error: enumeration value 'FAIL_FILE' not handled in switch [-Werror=switch]
/in/simulation.cpp:551:12: error: enumeration value 'TOO_MANY_SPECIES' not handled in switch [-Werror=switch]
/in/simulation.cpp:551:12: error: enumeration value 'TOO_MANY_INSTRUCTIONS' not handled in switch [-Werror=switch]
/in/simulation.cpp:551:12: error: enumeration value 'UNKNOWN_INSTRUCTION' not handled in switch [-Werror=switch]
/in/simulation.cpp:551:12: error: enumeration value 'TOO_MANY_CREATURES' not handled in switch [-Werror=switch]
/in/simulation.cpp:551:12: error: enumeration value 'SPECIES_NOT_FOUND' not handled in switch [-Werror=switch]
/in/simulation.cpp:551:12: error: enumeration value 'DIRECTION_NOT_RECORNIZED' not handled in switch [-Werror=switch]
/in/simulation.cpp:551:12: error: enumeration value 'GRID_HEIGHT_IS_ILLEGAL' not handled in switch [-Werror=switch]
/in/simulation.cpp:551:12: error: enumeration value 'GRID_WIDTH_IS_ILLEGAL' not handled in switch [-Werror=switch]
/in/simulation.cpp:551:12: error: enumeration value 'OCCUPIED_SQUARE' not handled in switch [-Werror=switch]
/in/simulation.cpp: In member function 'void simulation::error_publisher(const error_name&, const string&, const string&, const int&, const int&, const string&, const string&, const int&, const int&) const':
/in/simulation.cpp:560:12: error: enumeration value 'MISSING_ARG' not handled in switch [-Werror=switch]
switch (error){
^
/in/simulation.cpp:560:12: error: enumeration value 'NEGATIVE_ROUNDS' not handled in switch [-Werror=switch]
/in/simulation.cpp:560:12: error: enumeration value 'FAIL_FILE' not handled in switch [-Werror=switch]
/in/simulation.cpp:560:12: error: enumeration value 'TOO_MANY_SPECIES' not handled in switch [-Werror=switch]
/in/simulation.cpp:560:12: error: enumeration value 'TOO_MANY_INSTRUCTIONS' not handled in switch [-Werror=switch]
/in/simulation.cpp:560:12: error: enumeration value 'UNKNOWN_INSTRUCTION' not handled in switch [-Werror=switch]
/in/simulation.cpp:560:12: error: enumeration value 'TOO_MANY_CREATURES' not handled in switch [-Werror=switch]
/in/simulation.cpp:560:12: error: enumeration value 'SPECIES_NOT_FOUND' not handled in switch [-Werror=switch]
/in/simulation.cpp:560:12: error: enumeration value 'DIRECTION_NOT_RECORNIZED' not handled in switch [-Werror=switch]
/in/simulation.cpp:560:12: error: enumeration value 'GRID_HEIGHT_IS_ILLEGAL' not handled in switch [-Werror=switch]
/in/simulation.cpp:560:12: error: enumeration value 'GRID_WIDTH_IS_ILLEGAL' not handled in switch [-Werror=switch]
/in/simulation.cpp:560:12: error: enumeration value 'OUT_OF_BOUNDS' not handled in switch [-Werror=switch]
cc1plus: all warnings being treated as errors