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/util/extvalue.cpp

    r940 r973  
    326326                {
    327327                        SString tmp = getString();
    328                         if (tmp.len() > 30) tmp = tmp.substr(0, 30) + "...";
     328                        if (tmp.length() > 30) tmp = tmp.substr(0, 30) + "...";
    329329                        if (type == TString) tmp = SString("\"") + tmp + SString("\"");
    330330                        logPrintf("ExtValue", "getObjectTarget", LOG_WARN, "%s object expected, %s found", classname, tmp.c_str());
     
    614614                        return;
    615615                case TDouble:
    616                         setDouble(double(getInt())*src.getDouble());
     616                        setDouble(double(getInt()) * src.getDouble());
    617617                        return;
    618618                default:;
     
    790790        //            ^-cur     ^-next
    791791        //            ^^^^^^^^^^___sub
    792         const char* begin = fmt.c_str(), *end = begin + fmt.len(), *curr = begin;
     792        const char* begin = fmt.c_str(), *end = begin + fmt.length(), *curr = begin;
    793793        int type = 0;
    794794
     
    14011401        err->message = args[0].getString();
    14021402        if (err->message.startsWith(TO_STRING_PREFIX.c_str()))
    1403                 err->message = err->message.substr(TO_STRING_PREFIX.len());
     1403                err->message = err->message.substr(TO_STRING_PREFIX.length());
    14041404        *ret = makeDynamicObject(err);
    14051405}
Note: See TracChangeset for help on using the changeset viewer.