Changeset 973 for cpp/frams/genetics/fS


Ignore:
Timestamp:
07/03/20 00:37:13 (4 years ago)
Author:
Maciej Komosinski
Message:

Increased SString and std::string compatibility: introduced length(), size(), and capacity(), and removed legacy methods that have std::string equivalents

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/fS/fS_general.cpp

    r969 r973  
    9999                if (separatorIndex == -1)
    100100                {
    101                         keyLength = keyValue.len();
     101                        keyLength = keyValue.length();
    102102                        value = DEFAULT_NEURO_CONNECTION_WEIGHT;
    103103                } else
    104104                {
    105105                        keyLength = separatorIndex;
    106                         size_t valueLength = keyValue.len() - (separatorIndex);
     106                        size_t valueLength = keyValue.length() - (separatorIndex);
    107107                        value = fS_stod(buffer + separatorIndex + 1, start, &valueLength);
    108108                }
     
    859859{
    860860        SString geno;
    861         geno.memoryHint(100);     // Provide a small buffer from the start to improve performance
     861        geno.reserve(100);     // Provide a small buffer from the start to improve performance
    862862        startNode->getGeno(geno);
    863863        return geno;
Note: See TracChangeset for help on using the changeset viewer.