From a0c4102b5a23eefc5472c8eabad96990d2d1790f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 16 Jan 2018 10:11:35 +0100 Subject: [PATCH] util/OptionDef: add "constexpr" --- src/util/OptionDef.hxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/OptionDef.hxx b/src/util/OptionDef.hxx index 8dc238a4c..559eb9ec9 100644 --- a/src/util/OptionDef.hxx +++ b/src/util/OptionDef.hxx @@ -40,9 +40,9 @@ public: short_option(_short_option), desc(_desc) { } - bool HasLongOption() const { return long_option != nullptr; } - bool HasShortOption() const { return short_option != 0; } - bool HasDescription() const { return desc != nullptr; } + constexpr bool HasLongOption() const { return long_option != nullptr; } + constexpr bool HasShortOption() const { return short_option != 0; } + constexpr bool HasDescription() const { return desc != nullptr; } const char *GetLongOption() const { assert(HasLongOption());