Changeset 1287


Ignore:
Timestamp:
12/06/23 03:32:18 (12 months ago)
Author:
Maciej Komosinski
Message:

size_t <-> int type casts

Location:
cpp/frams/genetics
Files:
2 edited

Legend:

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

    r1280 r1287  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2021  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2023  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    9292int GenoConv_f90::findVertexAt(vector<XYZ_LOC> &vertices, const XYZ_LOC &vertex)
    9393{
    94         for (int i = 0; i < vertices.size(); i++)
     94        for (int i = 0; i < (int)vertices.size(); i++)
    9595                if (vertices[i].same_coordinates(vertex)) return i;
    9696        return -1;
  • cpp/frams/genetics/genooperators.cpp

    r1254 r1287  
    350350{
    351351        vector<int> allowed;
    352         for (size_t i = 0; i < NClist.size(); i++)
     352        for (int i = 0; i < (int)NClist.size(); i++)
    353353                if (NClist[i]->getPreferredOutput() != 0) //this NeuroClass provides output
    354354                        allowed.push_back(i);
     
    359359{
    360360        vector<int> allowed;
    361         for (size_t i = 0; i < NClist.size(); i++)
     361        for (int i = 0; i < (int)NClist.size(); i++)
    362362                if (NClist[i]->getPreferredInputs() != 0) //this NeuroClass wants one input connection or more                 
    363363                        allowed.push_back(i);
     
    549549        int counter[256] = {}; //initialize with zeros; 256 is unnecessarily too big and redundant, but enables very fast access (indexed directly by the ascii code)
    550550        string simplified = "";
    551         for (int i = original.size() - 1; i >= 0; i--) //iterate from end to begin so it is easier to remove "oldest" = first modifiers
     551        for (int i = int(original.size()) - 1; i >= 0; i--) //iterate from end to begin so it is easier to remove "oldest" = first modifiers
    552552        {
    553553                unsigned char c = original[i];
Note: See TracChangeset for help on using the changeset viewer.