Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 19, 2008, 3:54:50 PM (16 years ago)
Author:
landauf
Message:

removed bug in ConfigValueContainer with default-vector with size zero (last attempt wasn't successful)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/console/src/core/ConfigValueContainer.cc

    r1324 r1325  
    8787
    8888        if (defvalue.size() > 0)
    89             this->value_ = defvalue[0];
    90 
    91         for (unsigned int i = 0; i < defvalue.size(); i++)
    92             ConfigFileManager::getSingleton()->getValue(this->type_, this->sectionname_, this->varname_, i, defvalue[i].toString(), this->value_.isA(MT_string));
    93 
    94         for (unsigned int i = 0; i < defvalue.size(); i++)
    95             this->defvalueStringVector_.push_back(defvalue[i].toString());
    96 
    97         this->update();
     89        {
     90                this->value_ = defvalue[0];
     91
     92            for (unsigned int i = 0; i < defvalue.size(); i++)
     93            {
     94                ConfigFileManager::getSingleton()->getValue(this->type_, this->sectionname_, this->varname_, i, defvalue[i].toString(), this->value_.isA(MT_string));
     95                this->defvalueStringVector_.push_back(defvalue[i].toString());
     96            }
     97
     98            this->update();
     99        }
    98100    }
    99101
     
    282284            {
    283285                if (i < this->defvalueStringVector_.size())
     286                {
    284287                    this->value_.fromString(ConfigFileManager::getSingleton()->getValue(this->type_, this->sectionname_, this->varname_, i, this->defvalueStringVector_[i], this->value_.isA(MT_string)));
     288                }
    285289                else
    286                     this->value_.fromString(ConfigFileManager::getSingleton()->getValue(this->type_, this->sectionname_, this->varname_, i, MultiTypeMath(), this->value_.isA(MT_string)));
     290                {
     291                    this->value_.fromString(ConfigFileManager::getSingleton()->getValue(this->type_, this->sectionname_, this->varname_, i, "abc", this->value_.isA(MT_string)));
     292                }
    287293
    288294                this->valueVector_.push_back(this->value_);
Note: See TracChangeset for help on using the changeset viewer.