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; 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) void Hazelnupp::RegisterAbbreviation(const std::string& abbrev, const std::string& target)

View File

@ -19,7 +19,7 @@ public:
const std::string& GetExecutableName() const; const std::string& GetExecutableName() const;
//! Will return the value given a key //! 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 //! Will check wether a parameter exists given a key, or not
bool HasParam(const std::string& key) const; bool HasParam(const std::string& key) const;

View File

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

View File

@ -13,7 +13,7 @@ public:
const std::string& Key() const; const std::string& Key() const;
//! Will return the value of this parameter //! 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) 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")) if (args.HasParam("--alfredo"))
{ {
std::cout << *args["--alfredo"] << std::endl; std::cout << args["--alfredo"] << std::endl;
} }
else else
{ {