diff --git a/Hazelnupp/Hazelnupp.cpp b/Hazelnupp/Hazelnupp.cpp index 3296ab8..a484eba 100644 --- a/Hazelnupp/Hazelnupp.cpp +++ b/Hazelnupp/Hazelnupp.cpp @@ -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) diff --git a/Hazelnupp/Hazelnupp.h b/Hazelnupp/Hazelnupp.h index 33e2f2a..96e0e95 100644 --- a/Hazelnupp/Hazelnupp.h +++ b/Hazelnupp/Hazelnupp.h @@ -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; diff --git a/Hazelnupp/Parameter.cpp b/Hazelnupp/Parameter.cpp index 8e92548..9c00d6d 100644 --- a/Hazelnupp/Parameter.cpp +++ b/Hazelnupp/Parameter.cpp @@ -21,7 +21,7 @@ const std::string& Parameter::Key() const return key; } -const ::Value* Parameter::Value() const +const ::Value* Parameter::GetValue() const { return value; } diff --git a/Hazelnupp/Parameter.h b/Hazelnupp/Parameter.h index 066a9c6..12712e0 100644 --- a/Hazelnupp/Parameter.h +++ b/Hazelnupp/Parameter.h @@ -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) { diff --git a/Hazelnupp/main.cpp b/Hazelnupp/main.cpp index d10c39d..376a2a3 100644 --- a/Hazelnupp/main.cpp +++ b/Hazelnupp/main.cpp @@ -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 {