Ignore:
Timestamp:
02/15/18 00:44:00 (3 years ago)
Author:
Maciej Komosinski
Message:

SString -> std::string

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/param/paramtree.cpp

    r723 r734  
     1// This file is a part of Framsticks SDK.  http://www.framsticks.com/
     2// Copyright (C) 1999-2018  Maciej Komosinski and Szymon Ulatowski.
     3// See LICENSE.txt for details.
     4
    15#include "paramtree.h"
    26
    3 ParamTree::Node *ParamTree::addNode(ParamTree::Node* parent, const SString& name, int group)
     7ParamTree::Node *ParamTree::addNode(ParamTree::Node* parent, const string& name, int group)
    48{
    59        std::shared_ptr<Node> new_it(new Node(this, parent, name, group));
     
    2125}
    2226
    23 ParamTree::Node *ParamTree::findNode(ParamTree::Node *parent, const SString& name)
     27ParamTree::Node *ParamTree::findNode(ParamTree::Node *parent, const string& name)
    2428{
    2529        for (ParamTree::Node *it = parent->first_child.get(); it != NULL; it = it->next_sibling.get())
     
    5357                        if (colons != level) continue;
    5458
    55                         SString name = grname; // "abc:def:ghi"
     59                        string name = grname; // "abc:def:ghi"
    5660                        Node *parentnode = &root;
    5761                        int i = 0;
     
    5963                        for (int haslevel = 0; haslevel < level; haslevel++)
    6064                        {
    61                                 i = name.indexOf(':', 0); // can't fail!
     65                                i = name.find(':'); // always succeeds because we counted the colons before
    6266                                // "na:me" -> prefix="na",name="me"
    63                                 SString prefix = name.substr(0, i);
     67                                string prefix = name.substr(0, i);
    6468                                // search for parent node in listview ('prefix')
    6569                                Node *it = findNode(parentnode, prefix);
Note: See TracChangeset for help on using the changeset viewer.