Changeset 973 for cpp/frams/neuro


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

Location:
cpp/frams/neuro
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/neuro/impl/neuroimpl-fuzzy-f0.cpp

    r827 r973  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    8383int FuzzyF0String::convertStrToRules(const SString& str, const int ruledef[], int **rules, int setsNr, int rulesNr, int &maxOutputNr)
    8484{
    85         int pos = 0, j, k, len = str.len();
     85        int pos = 0, j, k, len = str.length();
    8686        int dNr = 0, sNr = 0;
    8787        int inNr, outNr; //number of inputs/outputs and corresponding fuzzy sets
  • cpp/frams/neuro/impl/neuroimpl-fuzzy.cpp

    r907 r973  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    2121
    2222        //check correctness of given parameters: string must not be null, sets&rules number > 0
    23         if ((fuzzySetsNr < 1) || (rulesNr < 1) || (fuzzySetString.len() == 0) || (fuzzyRulesString.len() == 0))
     23        if ((fuzzySetsNr < 1) || (rulesNr < 1) || (fuzzySetString.length() == 0) || (fuzzyRulesString.length() == 0))
    2424                return 0; //error
    2525
  • cpp/frams/neuro/neurofactory.cpp

    r935 r973  
    103103                }
    104104        }
    105         if (removed.len())
     105        if (removed.length())
    106106                logPrintf("NeuroFactory", "removeUninmplemented", LOG_INFO,
    107107                        "Removed Neuro classes: %s", removed.c_str());
  • cpp/frams/neuro/neurolibparam.cpp

    r790 r973  
    11// This file is a part of Framsticks SDK.  http://www.framsticks.com/
    2 // Copyright (C) 1999-2015  Maciej Komosinski and Szymon Ulatowski.
     2// Copyright (C) 1999-2020  Maciej Komosinski and Szymon Ulatowski.
    33// See LICENSE.txt for details.
    44
     
    3333static bool isGoodName(const SString& name)
    3434{
    35         for (int i = 0; i < name.len(); i++)
     35        for (int i = 0; i < name.length(); i++)
    3636                if (!isalnum(name[i])) return false;
    3737        return true;
Note: See TracChangeset for help on using the changeset viewer.