util/OptionDef: add "constexpr"
This commit is contained in:
parent
9420066895
commit
a0c4102b5a
@ -40,9 +40,9 @@ public:
|
|||||||
short_option(_short_option),
|
short_option(_short_option),
|
||||||
desc(_desc) { }
|
desc(_desc) { }
|
||||||
|
|
||||||
bool HasLongOption() const { return long_option != nullptr; }
|
constexpr bool HasLongOption() const { return long_option != nullptr; }
|
||||||
bool HasShortOption() const { return short_option != 0; }
|
constexpr bool HasShortOption() const { return short_option != 0; }
|
||||||
bool HasDescription() const { return desc != nullptr; }
|
constexpr bool HasDescription() const { return desc != nullptr; }
|
||||||
|
|
||||||
const char *GetLongOption() const {
|
const char *GetLongOption() const {
|
||||||
assert(HasLongOption());
|
assert(HasLongOption());
|
||||||
|
Loading…
Reference in New Issue
Block a user