Ignore:
Timestamp:
07/03/20 00:37:13 (9 months ago)
Author:
Maciej Komosinski
Message:

Increased SString and std::string compatibility: introduced length(), size(), and capacity(), and removed legacy methods that have std::string equivalents

File:
1 edited

Legend:

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

    r779 r973  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    3232        m.open(using_checkpoints);
    3333        int recently_added = addSegment(m, 0, vertices, current, 0xDead);
    34         for (int i = 0; i < in.len(); i++)
     34        for (int i = 0; i < in.length(); i++)
    3535        {
    3636                char command = in[i];
     
    119119        double d1 = ind - indpre;
    120120        double d2 = indpost - ind;
    121         double v = indpre == indpost ? v1 : d2*v1 + d1*v2; //d1+d2==1
     121        double v = indpre == indpost ? v1 : d2 * v1 + d1 * v2; //d1+d2==1
    122122        return v;
    123123}
     
    136136                Joint *j = m.getJoint(i);
    137137                double x = joints_count < 2 ? 0 : (double)i / (joints_count - 1); //0..1, postion in the rainbow
    138                 double ind = x*maxind;
     138                double ind = x * maxind;
    139139                j->vcolor.x = mix(r, maxind, ind);
    140140                j->vcolor.y = mix(g, maxind, ind);
     
    153153                        averagecolor += j->vcolor;
    154154                p->vcolor = averagecolor / count;
    155                 if (count>5) count = 5; //avoid too fat...
     155                if (count > 5) count = 5; //avoid too fat...
    156156                p->vsize = 0.3 + count / 15.0; //the more Joints is attached to a Part, the fatter it is
    157157        }
     
    169169                        ((3 * i + 5) % 10) - 4.5,
    170170                        ((7 * i + 2) % 10) - 4.5
    171                         ); //-4.5 .. 4.5 in each axis
     171                ); //-4.5 .. 4.5 in each axis
    172172                p->p += noise / 1000;
    173173        }
Note: See TracChangeset for help on using the changeset viewer.