Add virtual destructors to Option and Options. Option member is set to protected mode.
This commit is contained in:
parent
6a891e3d81
commit
491cad95de
@ -1575,6 +1575,8 @@ namespace cxxopts
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual ~Option() = default;
|
||||||
|
|
||||||
std::string opts_;
|
std::string opts_;
|
||||||
std::string desc_;
|
std::string desc_;
|
||||||
std::shared_ptr<const Value> value_;
|
std::shared_ptr<const Value> value_;
|
||||||
@ -1656,6 +1658,8 @@ namespace cxxopts
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
virtual ~Options() = default;
|
||||||
|
|
||||||
Options&
|
Options&
|
||||||
positional_help(std::string help_text)
|
positional_help(std::string help_text)
|
||||||
{
|
{
|
||||||
@ -1776,6 +1780,8 @@ namespace cxxopts
|
|||||||
void
|
void
|
||||||
generate_all_groups_help(String& result) const;
|
generate_all_groups_help(String& result) const;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
|
||||||
std::string m_program{};
|
std::string m_program{};
|
||||||
String m_help_string{};
|
String m_help_string{};
|
||||||
std::string m_custom_help{};
|
std::string m_custom_help{};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user