Use default operators generated/synthesized by compiler

This commit is contained in:
Chocobo1 2022-04-02 13:34:52 +08:00
parent 10ee1ab7a2
commit 7612d5d0ef
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
15 changed files with 4 additions and 76 deletions

View file

@ -134,11 +134,6 @@ namespace
}
};
bool operator==(const QString &arg, const BoolOption &option)
{
return (option == arg);
}
// Option with string value. May not have a shortcut
struct StringOption : protected Option
{
@ -181,11 +176,6 @@ namespace
}
};
bool operator==(const QString &arg, const StringOption &option)
{
return (option == arg);
}
// Option with integer value. May not have a shortcut
class IntOption : protected StringOption
{
@ -233,11 +223,6 @@ namespace
}
};
bool operator==(const QString &arg, const IntOption &option)
{
return (option == arg);
}
// Option that is explicitly set to true or false, and whose value is undefined when unspecified.
// May not have a shortcut.
class TriStateBoolOption : protected Option
@ -316,11 +301,6 @@ namespace
bool m_defaultValue;
};
bool operator==(const QString &arg, const TriStateBoolOption &option)
{
return (option == arg);
}
constexpr const BoolOption SHOW_HELP_OPTION {"help", 'h'};
constexpr const BoolOption SHOW_VERSION_OPTION {"version", 'v'};
#if defined(DISABLE_GUI) && !defined(Q_OS_WIN)