Loading src/conf.cpp +5 −6 Original line number Diff line number Diff line Loading @@ -300,11 +300,6 @@ size_t confplus::Config::getElements(confplus::Config::ConfigData* key) const{ } const std::string confplus::Config::getValue(confplus::Config::ConfigData* key, size_t pos) const{ if(key->haveChild){ ConfException err; err[ConfException::Error] << "getValue it is a path not key" << pos; throw err; } if(key->Elements<pos){ ConfException err; err[ConfException::Error] << "getValue pos out of range !" << pos; Loading @@ -313,10 +308,14 @@ const std::string confplus::Config::getValue(confplus::Config::ConfigData* key, for(ConfigValue *cur=key->Value.get(); cur; cur=cur->_nextValue.get()){ if(cur->_Pos==pos){ if (cur->haveChild) { ConfException err; err[ConfException::Error] << "getValue it is a path not key" << pos; throw err; } return cur->_Value; } } return ""; } Loading Loading
src/conf.cpp +5 −6 Original line number Diff line number Diff line Loading @@ -300,11 +300,6 @@ size_t confplus::Config::getElements(confplus::Config::ConfigData* key) const{ } const std::string confplus::Config::getValue(confplus::Config::ConfigData* key, size_t pos) const{ if(key->haveChild){ ConfException err; err[ConfException::Error] << "getValue it is a path not key" << pos; throw err; } if(key->Elements<pos){ ConfException err; err[ConfException::Error] << "getValue pos out of range !" << pos; Loading @@ -313,10 +308,14 @@ const std::string confplus::Config::getValue(confplus::Config::ConfigData* key, for(ConfigValue *cur=key->Value.get(); cur; cur=cur->_nextValue.get()){ if(cur->_Pos==pos){ if (cur->haveChild) { ConfException err; err[ConfException::Error] << "getValue it is a path not key" << pos; throw err; } return cur->_Value; } } return ""; } Loading