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/_demos/simil_test.cpp

    r895 r973  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2016  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    7878                M.m_adFactors[i] = -1.0;
    7979        }
    80        
     80
    8181        iCurrParam++;
    8282        szCurrParam = argv[iCurrParam];
    83         int measure_type = -1; 
     83        int measure_type = -1;
    8484        nResult = sscanf(szCurrParam, "%d", &measure_type);
    8585        if (nResult != 1)
     
    8888                return -1;
    8989        }
    90        
     90
    9191        if (measure_type != 0 && measure_type != 1)
    9292        {
    9393                printf("Measure type should be 0 (flexible criteria order and optimal matching) or 1 (vertex degree order and greedy matching)!\n");
    94                 return -1;             
    95         }
    96        
     94                return -1;
     95        }
     96
    9797        M.matching_method = measure_type;
    9898
     
    150150                // while a valid genotype was loaded
    151151                count++;
    152                 totalsize += loaded->genotype.len();
     152                totalsize += loaded->genotype.length();
    153153                // create a Geno object based on the MiniGenotype
    154154                Geno *pNextGenotype = new Geno(loaded->genotype);
     
    156156                {
    157157                        pvGenos.push_back(pNextGenotype);
    158                         char *szNewName = new char[loaded->name.len() + 1];
     158                        char *szNewName = new char[loaded->name.length() + 1];
    159159                        strcpy(szNewName, loaded->name.c_str());
    160160                        pvNames.push_back(szNewName);
Note: See TracChangeset for help on using the changeset viewer.