Changeset 319 for cpp/frams/genetics


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

Fixed compilation warnings

Location:
cpp/frams/genetics
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/f1/conv_f1.cpp

    r286 r319  
    1818{
    1919public:
    20 Builder(const char*g,int mapping=0):invalid(0),genbegin(g),usemapping(mapping),energ(0),energ_div(0),first_part_mapping(NULL) {}
     20Builder(const char*g,int mapping=0):invalid(0),genbegin(g),usemapping(mapping),first_part_mapping(NULL),energ(0),energ_div(0) {}
    2121~Builder() {SAFEDELETE(first_part_mapping);}
    2222char tmp[222];
  • 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);
  • cpp/frams/genetics/fF/conv_fF.cpp

    r286 r319  
    104104                double pcx = chambers[which - 1]->centerX;
    105105                double pcy = chambers[which - 1]->centerY;
    106                 double pcz = chambers[which - 1]->centerZ;
     106                //double pcz = chambers[which - 1]->centerZ; //not used
    107107
    108108                /* aperture of the next to last chamber */
    109109                double ppx;
    110110                double ppy;
    111                 double ppz;
     111                //double ppz; //not used
    112112
    113113                if (which == 1)
     
    115115                        ppx = pcx;
    116116                        ppy = pcy;
    117                         ppz = pcz;
     117                        //ppz = pcz;
    118118                }
    119119                else
     
    121121                        ppx = chambers[which - 2]->holeX;
    122122                        ppy = chambers[which - 2]->holeY;
    123                         ppz = chambers[which - 2]->holeZ;
     123                        //ppz = chambers[which - 2]->holeZ;
    124124                }
    125125
  • cpp/frams/genetics/fT/oper_fTest.cpp

    r286 r319  
    6565        if (!gene[0]) return 1; //empty is not valid
    6666        bool ok = true;
    67         int i;
     67        size_t i;
    6868        for (i = 0; i < strlen(gene); i++) if (!strchr("ATGC", gene[i])) { ok = false; break; }
    6969        return ok ? GENOPER_OK : i + 1;
     
    7474{
    7575        SString validated; //new genotype (everything except ATGC is skipped)
    76         for (int i = 0; i < strlen(gene); i++)
     76        for (size_t i = 0; i < strlen(gene); i++)
    7777                if (strchr("ATGC", gene[i])) validated += gene[i];  //validated contains only ATGC
    7878        free(gene);
  • cpp/frams/genetics/genman.cpp

    r286 r319  
    101101GenMan::GenMan() : localpar(GMparam_tab, this), localstats(GMstats_tab, this),
    102102seloperpar("GenOperators", "Genetics: Active operators"),
    103 par("GenMan", "Manages various genetic operations, using appropriate operators for the argument genotype format."),
    104 neuronsparam("Genetics: Neurons to add", "neuronsAdd", "neuadd_")
     103neuronsparam("Genetics: Neurons to add", "neuronsAdd", "neuadd_"),
     104par("GenMan", "Manages various genetic operations, using appropriate operators for the argument genotype format.")
    105105{
    106106        history = 0;
Note: See TracChangeset for help on using the changeset viewer.