clean up standard_value class a bit
This removes the `final` on the class, and the `virtual` keyword on the functions that made `final` necessary. They shouldn't have been virtual in the first place since nothing derives from it. This hopefully doesn't reintroduce the non-virtual-destructor warning.
This commit is contained in:
parent
38b4b1bee4
commit
1d6d1c97f0
@ -692,7 +692,7 @@ namespace cxxopts
|
|||||||
};
|
};
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
class standard_value final : public Value
|
class standard_value : public Value
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
standard_value()
|
standard_value()
|
||||||
@ -742,15 +742,17 @@ namespace cxxopts
|
|||||||
return m_implicit;
|
return m_implicit;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::shared_ptr<Value>
|
std::shared_ptr<Value>
|
||||||
default_value(const std::string& value){
|
default_value(const std::string& value)
|
||||||
|
{
|
||||||
m_default = true;
|
m_default = true;
|
||||||
m_default_value = value;
|
m_default_value = value;
|
||||||
return shared_from_this();
|
return shared_from_this();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::shared_ptr<Value>
|
std::shared_ptr<Value>
|
||||||
implicit_value(const std::string& value){
|
implicit_value(const std::string& value)
|
||||||
|
{
|
||||||
m_implicit = true;
|
m_implicit = true;
|
||||||
m_implicit_value = value;
|
m_implicit_value = value;
|
||||||
return shared_from_this();
|
return shared_from_this();
|
||||||
@ -784,9 +786,11 @@ namespace cxxopts
|
|||||||
protected:
|
protected:
|
||||||
std::shared_ptr<T> m_result;
|
std::shared_ptr<T> m_result;
|
||||||
T* m_store;
|
T* m_store;
|
||||||
|
|
||||||
bool m_default = false;
|
bool m_default = false;
|
||||||
std::string m_default_value;
|
|
||||||
bool m_implicit = false;
|
bool m_implicit = false;
|
||||||
|
|
||||||
|
std::string m_default_value;
|
||||||
std::string m_implicit_value;
|
std::string m_implicit_value;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user