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/model/modelparts.cpp

    r952 r973  
    149149        SString t;
    150150        t = getDescription();
    151         if (t.len()) t += "\n\n";
     151        if (t.length()) t += "\n\n";
    152152        t += "Characteristics:\n";
    153153        if (getPreferredInputs())
     
    171171        if (p.getPropCount())
    172172        {
    173                 if (t.len()) t += "\n\n";
     173                if (t.length()) t += "\n\n";
    174174                t += "Properties:\n";
    175175                const char *h;
     
    341341{
    342342        SString ret = getClassName();
    343         if (myclassparams.len()) { if (!ret.len()) ret = "N"; ret += ":"; ret += myclassparams; }
     343        if (myclassparams.length()) { if (!ret.length()) ret = "N"; ret += ":"; ret += myclassparams; }
    344344        return ret;
    345345}
     
    372372int Neuro::addInput(Neuro *child, double weight, const SString *info)
    373373{
    374         inputs += NInput(child, weight, (info && (info->len())) ? new SString(*info) : 0);
     374        inputs += NInput(child, weight, (info && (info->length())) ? new SString(*info) : 0);
    375375        child->parentcount++;
    376376        if (child->parentcount == 1) { child->parent = this; }
     
    759759                ParamEntry entries[] = {
    760760                 { "class", 2, 0, "neuro class", "s", GETSET(neuroclass) },
    761                  { "liveNeuro", 2, 1, "live Neuro object", "oNeuro", GETONLY(liveNeuro) }};
     761                 { "liveNeuro", 2, 1, "live Neuro object", "oNeuro", GETONLY(liveNeuro) } };
    762762#undef FIELDSTRUCT
    763                 for(auto& e : entries) add(&e);
     763                for (auto& e : entries) add(&e);
    764764
    765765#define FIELDSTRUCT Neuro
     
    804804{
    805805#ifndef SDK_WITHOUT_FRAMS
    806         NeuroNetImpl::getLiveNeuroObject(this,ret);
     806        NeuroNetImpl::getLiveNeuroObject(this, ret);
    807807#endif
    808808}
Note: See TracChangeset for help on using the changeset viewer.