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/util/sstring.cpp

    r347 r348  
    251251void SString::operator+=(const SString&s)
    252252{
    253 append((const char*)s,s.len());
     253append(s.c_str(),s.len());
    254254}
    255255
     
    323323int SString::indexOf(const SString & substring,int start) const
    324324{
    325 char *found=strstr(buf->txt+start,((const char*)substring));
     325char *found=strstr(buf->txt+start,substring.c_str());
    326326return found?found-buf->txt:-1;
    327327}
     
    341341int SString::startsWith(const char *pattern) const
    342342{
    343 const char *t=(const char*)(*this);
     343const char *t=this->c_str();
    344344for (;*pattern;pattern++,t++)
    345345        if (*t != *pattern) return 0;
     
    358358{
    359359SString tmp=SString::sprintf("%.15g",d);
    360 if ((!strchr(tmp,'.'))&&(!strchr(tmp,'e'))) tmp+=".0";
     360if ((!strchr(tmp.c_str(),'.'))&&(!strchr(tmp.c_str(),'e'))) tmp+=".0";
    361361return tmp;
    362362}
Note: See TracChangeset for help on using the changeset viewer.