From 85477983452271946ef2dfa5cc8aad0aa841bb97 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Wed, 14 Jul 2010 15:12:09 +0200 Subject: [PATCH] Triviality in ucioption.cpp Signed-off-by: Marco Costalba --- src/ucioption.cpp | 134 +++++++++++++++++++--------------------------- 1 file changed, 54 insertions(+), 80 deletions(-) diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 04f06759..84bcc832 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -34,6 +34,8 @@ #include "ucioption.h" using std::string; +using std::cout; +using std::endl; //// //// Local definitions @@ -41,13 +43,9 @@ using std::string; namespace { - /// - /// Types - /// - enum OptionType { SPIN, COMBO, CHECK, STRING, BUTTON }; - typedef std::vector ComboValues; + typedef std::vector StrVector; struct Option { @@ -55,23 +53,42 @@ namespace { OptionType type; size_t idx; int minValue, maxValue; - ComboValues comboValues; + StrVector comboValues; Option(); Option(const char* defaultValue, OptionType = STRING); Option(bool defaultValue, OptionType = CHECK); Option(int defaultValue, int minValue, int maxValue); - bool operator<(const Option& o) const { return this->idx < o.idx; } + bool operator<(const Option& o) const { return idx < o.idx; } }; + typedef std::vector