From 377516a084467692cb275526a16d43b25f773e46 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 1 Feb 2019 01:14:30 +0200 Subject: cam: options: Move struct Option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Option structure is declared within the OptionsParser, but will later be needed by other parsers. Move it outside the OptionsParser class. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- src/cam/options.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/cam') diff --git a/src/cam/options.h b/src/cam/options.h index 491f6a31..6d1b12d2 100644 --- a/src/cam/options.h +++ b/src/cam/options.h @@ -17,6 +17,17 @@ enum OptionArgument { ArgumentOptional, }; +struct Option { + int opt; + const char *name; + OptionArgument argument; + const char *argumentName; + const char *help; + + bool hasShortOption() const { return isalnum(opt); } + bool hasLongOption() const { return name != nullptr; } +}; + class OptionsParser { public: @@ -42,17 +53,6 @@ public: void usage(); private: - struct Option { - int opt; - const char *name; - OptionArgument argument; - const char *argumentName; - const char *help; - - bool hasShortOption() const { return isalnum(opt); } - bool hasLongOption() const { return name != nullptr; } - }; - std::vector