Changeset 830 for cpp/frams


Ignore:
Timestamp:
11/26/18 00:00:16 (5 years ago)
Author:
Maciej Komosinski
Message:

"%ld" replaced with "%d" because it refers to int

Location:
cpp/frams/genetics
Files:
3 edited

Legend:

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

    r779 r830  
    274274{
    275275        double len = min(2.0, c.length);
    276         sprintf(tmp, "p1=%ld,p2=%ld,dx=%lg,rx=%lg,ry=%lg,rz=%lg,stam=%lg,vr=%g,vg=%g,vb=%g",
     276        sprintf(tmp, "p1=%d,p2=%d,dx=%lg,rx=%lg,ry=%lg,rz=%lg,stam=%lg,vr=%g,vg=%g,vb=%g",
    277277                part1, part2, len, angle.x, angle.y, angle.z, c.stamina, c.cred, c.cgreen, c.cblue);
    278278        lastjoint_muscle_power = c.muscle_power;
  • cpp/frams/genetics/f4/f4_conv.cpp

    r804 r830  
    217217                if ((jj_p1_refno < 0) || (jj_p1_refno >= getPartCount())) return -11;
    218218                if ((jj_p2_refno < 0) || (jj_p2_refno >= getPartCount())) return -12;
    219                 sprintf(tmpLine, "p1=%ld,p2=%ld,dx=%g,dy=0,dz=0,rx=%g,ry=0,rz=%g"\
     219                sprintf(tmpLine, "p1=%d,p2=%d,dx=%g,dy=0,dz=0,rx=%g,ry=0,rz=%g"\
    220220                        ",stam=%g",
    221221                        jj_p1_refno, jj_p2_refno,
     
    244244                                partno = C->dadlink->p2_refno;
    245245                                if ((partno < 0) || (partno >= getPartCount())) return -21;
    246                                 else sprintf(tmpLine, "p=%ld,d=\"N:in=%g,fo=%g,si=%g\"", partno, C->inertia, C->force, C->sigmo);
     246                                else sprintf(tmpLine, "p=%d,d=\"N:in=%g,fo=%g,si=%g\"", partno, C->inertia, C->force, C->sigmo);
    247247                        }
    248248                        else
     
    265265                        else
    266266                        {
    267                                 sprintf(tmpLine, "p=%ld,d=\"%s\"", partno, nclass);
     267                                sprintf(tmpLine, "p=%d,d=\"%s\"", partno, nclass);
    268268                        }
    269269                        partidx = addFromString(NeuronType, tmpLine, &range);
  • cpp/frams/genetics/f4/f4_general.cpp

    r829 r830  
    12551255                        else
    12561256                        {
    1257                                 sprintf(buf2, "%ld", l1);
     1257                                sprintf(buf2, "%d", l1);
    12581258                                out += buf2;
    12591259                        }
Note: See TracChangeset for help on using the changeset viewer.