Changeset 1298 for cpp/frams/genetics/fL
- Timestamp:
- 03/29/24 23:30:34 (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/fL/fL_oper.cpp
r1273 r1298 181 181 else 182 182 { 183 int rid = rndUint( (unsigned int)creature->rules.size());183 int rid = rndUint(creature->rules.size()); 184 184 list = &creature->rules[rid]->objsucc; 185 185 numparams = creature->rules[rid]->objpred->npar; … … 313 313 if (creature->rules.size() > 0) 314 314 { 315 int ruleid = rndUint( (unsigned int)creature->rules.size());315 int ruleid = rndUint(creature->rules.size()); 316 316 if (!creature->rules[ruleid]->condeval) 317 317 { … … 350 350 if (wordswithnorules.size() > 0) 351 351 { 352 int predid = rndUint( (unsigned int)wordswithnorules.size());352 int predid = rndUint(wordswithnorules.size()); 353 353 fL_Rule *newrule = new fL_Rule(0, 0); 354 354 fL_Word *pred = new fL_Word(); … … 362 362 else if (creature->rules.size() > 0) 363 363 { 364 int ruleid = rndUint( (unsigned int)creature->rules.size());364 int ruleid = rndUint(creature->rules.size()); 365 365 fL_Rule *newrule = new fL_Rule(0, 0); 366 366 fL_Word *pred = new fL_Word(); … … 465 465 else 466 466 { 467 int rndid = rndUint( (unsigned int)list->size());467 int rndid = rndUint(list->size()); 468 468 std::list<fL_Word *>::iterator it = list->begin(); 469 469 std::advance(it, rndid); … … 492 492 int tmp = 0; 493 493 std::list<fL_Word *> *list = selectRandomSequence(creature, numpars, tmp); 494 int rndid = rndUint( (unsigned int)list->size());494 int rndid = rndUint(list->size()); 495 495 std::list<fL_Word *>::iterator it = list->begin(); 496 496 std::advance(it, rndid); … … 541 541 int tmp = 0; 542 542 std::list<fL_Word *> *list = selectRandomSequence(creature, numpars, tmp); 543 int rndid = rndUint( (unsigned int)list->size());543 int rndid = rndUint(list->size()); 544 544 std::list<fL_Word *>::iterator selectedword = list->begin(); 545 545 std::advance(selectedword, rndid); … … 555 555 int numpars = 0; 556 556 std::list<fL_Word *> *list = selectRandomSequence(creature, numpars, tmp); 557 int rndid = rndUint( (unsigned int)list->size());557 int rndid = rndUint(list->size()); 558 558 std::list<fL_Word *>::iterator it = list->begin(); 559 559 std::advance(it, rndid); … … 587 587 if (available.size() > 0) 588 588 { 589 int newnameid = rndUint( (unsigned int)available.size());589 int newnameid = rndUint(available.size()); 590 590 (*selectedword)->name = available[newnameid]->name; 591 591 } … … 762 762 for (int i = 0; i < numselrules; i++) 763 763 { 764 int rulid = rndUint( (unsigned int)from->rules.size());764 int rulid = rndUint(from->rules.size()); 765 765 fL_Rule *rul = from->rules[rulid]; 766 766 fL_Rule *newrule = new fL_Rule(0, 0);
Note: See TracChangeset
for help on using the changeset viewer.