Commit 9eb31d52 authored by jan.koester's avatar jan.koester
Browse files

test

parent 2d37e40a
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -140,9 +140,6 @@ void confplus::Yaml::loadConfig(const char *path,Config *conf){
            }
            cname+=key;
            Config::ConfigData *ckey=conf->setKey(cname);

            std::cout << cname << "=" << value << std::endl;

            conf->setValue(ckey,pos,value);
            value.clear();
            if(!seq){
+4 −8
Original line number Diff line number Diff line
@@ -97,8 +97,7 @@ confplus::Config::ConfigData *confplus::Config::setKey(const std::string &key){
    ConfigData *find=nullptr;

    std::unique_ptr<ConfigData> *root_ptr = &firstData;

    ConfigData* current_parent_node = nullptr;
    ConfigData* prevConf = nullptr;

    while(pos<=key.length()){

@@ -110,9 +109,8 @@ confplus::Config::ConfigData *confplus::Config::setKey(const std::string &key){
            find = existsdat(root_ptr->get(), childkey);

            if (!find) {

                if(current_parent_node)
                    current_parent_node->haveChild=true;
                if(prevConf)
                    prevConf->haveChild=true;

                std::unique_ptr<ConfigData>* current_ptr = root_ptr;

@@ -124,10 +122,8 @@ confplus::Config::ConfigData *confplus::Config::setKey(const std::string &key){

                find = current_ptr->get();
                find->Key = childkey;
                prevConf=find;
            }

            current_parent_node = find;

            root_ptr = &find->Child;
        }
        ++pos;