Changeset 348 for cpp/frams/virtfile


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/virtfile/stringfile.cpp

    r295 r348  
    1313        int need = (int)(size*nmemb);
    1414        if (need > have) { nmemb = have / size; need = (int)(size*nmemb); }
    15         memcpy(ptr, ((const char*)str) + pos, need);
     15        memcpy(ptr, str.c_str() + pos, need);
    1616        pos += need;
    1717        return nmemb;
     
    3232        if (size < 0) size = 0;
    3333        if (have > size) have = size - 1;
    34         const char* src = ((const char*)str) + pos;
     34        const char* src = str.c_str() + pos;
    3535        char *dest = s;
    3636        while (have-- > 0)
Note: See TracChangeset for help on using the changeset viewer.