Commit 36a6405e authored by Max Kellermann's avatar Max Kellermann

util/OptionParser: add "constexpr"

parent 42c1fe96
......@@ -39,13 +39,15 @@ public:
/**
* Constructs #OptionParser.
*/
OptionParser(int _argc, char **_argv) noexcept
constexpr OptionParser(int _argc, char **_argv) noexcept
:argc(_argc - 1), argv(_argv + 1) {}
/**
* Checks if there are command line entries to process.
*/
bool HasEntries() const noexcept { return argc > 0; }
constexpr bool HasEntries() const noexcept {
return argc > 0;
}
/**
* Gets the last parsed option.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment