Changeset 319 for cpp/frams/genetics/f9


Ignore:
Timestamp:
02/01/15 01:08:50 (10 years ago)
Author:
Maciej Komosinski
Message:

Fixed compilation warnings

Location:
cpp/frams/genetics/f9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/f9/conv_f9.cpp

    r286 r319  
    9191int GenoConv_f90::findVertexAt(vector<XYZ_LOC> &vertices, const XYZ_LOC &vertex)
    9292{
    93         for (int i = 0; i < vertices.size(); i++)
     93        for (size_t i = 0; i < vertices.size(); i++)
    9494                if (vertices[i].same_coordinates(vertex)) return i;
    9595        return -1;
  • cpp/frams/genetics/f9/oper_f9.cpp

    r286 r319  
    3030        if (!gene[0]) return 1; //empty is not valid
    3131        bool ok = true;
    32         int i;
     32        size_t i;
    3333        for (i = 0; i < strlen(gene); i++) if (!strchr(turtle_commands_f9, gene[i])) { ok = false; break; }
    3434        return ok ? GENOPER_OK : i + 1;
     
    3939{
    4040        SString validated; //new genotype (everything except turtle_commands_f9 is skipped)
    41         for (int i = 0; i < strlen(gene); i++)
     41        for (size_t i = 0; i < strlen(gene); i++)
    4242                if (strchr(turtle_commands_f9, gene[i])) validated += gene[i];  //validated contains only turtle_commands_f9
    4343        free(gene);
Note: See TracChangeset for help on using the changeset viewer.