Changeset 348 for cpp/frams/genetics/f1


Ignore:
Timestamp:
04/09/15 23:51:28 (9 years ago)
Author:
Maciej Komosinski
Message:
  • explicit c_str() in SString instead of (const char*) cast
  • genetic converters and GenMan? are now thread-local which enables multi-threaded simulator separation
File:
1 edited

Legend:

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

    r319 r348  
    102102SString GenoConv_f1::convert(SString &i,MultiMap *map)
    103103{
    104 const char* g=(const char*)i;
     104const char* g=i.c_str();
    105105Builder builder(g,map?1:0);
    106106builder.model.open();
     
    403403                                        lastNeuroClassParam();
    404404                                        //special handling: muscle properties (can be overwritten by subsequent property assignments)
    405                                         if (!strcmp(cls->getName(),"|"))
     405                                        if (!strcmp(cls->getName().c_str(),"|"))
    406406                                                {
    407407                                                neuro_cls_param->setDoubleById("p",lastjoint_muscle_power);
    408408                                                neuro_cls_param->setDoubleById("r",props.bendrange);
    409409                                                }
    410                                         else if (!strcmp(cls->getName(),"@"))
     410                                        else if (!strcmp(cls->getName().c_str(),"@"))
    411411                                                {
    412412                                                neuro_cls_param->setDoubleById("p",lastjoint_muscle_power);
     
    485485        SString name(begin,colon-begin);
    486486        SString value(colon+1,end-(colon+1));
    487         addClassParam(name,value);
    488         }
    489 }
     487        addClassParam(name.c_str(),value.c_str());
     488        }
     489}
Note: See TracChangeset for help on using the changeset viewer.