Renamed Value()

This commit is contained in:
Leonetienne 2021-06-02 19:57:16 +02:00
parent be608e9680
commit 7b9edcd356
5 changed files with 6 additions and 6 deletions

View File

@ -294,9 +294,9 @@ const std::string& Hazelnupp::GetExecutableName() const
return executableName;
}
const Value* Hazelnupp::operator[](const std::string& key) const
const Value& Hazelnupp::operator[](const std::string& key) const
{
return parameters.find(key)->second->Value();
return *parameters.find(key)->second->GetValue();
}
void Hazelnupp::RegisterAbbreviation(const std::string& abbrev, const std::string& target)

View File

@ -19,7 +19,7 @@ public:
const std::string& GetExecutableName() const;
//! Will return the value given a key
const Value* operator[](const std::string& key) const;
const Value& operator[](const std::string& key) const;
//! Will check wether a parameter exists given a key, or not
bool HasParam(const std::string& key) const;

View File

@ -21,7 +21,7 @@ const std::string& Parameter::Key() const
return key;
}
const ::Value* Parameter::Value() const
const ::Value* Parameter::GetValue() const
{
return value;
}

View File

@ -13,7 +13,7 @@ public:
const std::string& Key() const;
//! Will return the value of this parameter
const Value* Value() const;
const Value* GetValue() const;
friend std::ostream& operator<< (std::ostream& os, const Parameter& p)
{

View File

@ -42,7 +42,7 @@ int main(int argc, char** argv)
if (args.HasParam("--alfredo"))
{
std::cout << *args["--alfredo"] << std::endl;
std::cout << args["--alfredo"] << std::endl;
}
else
{