diff options
author | 2015-04-19 12:08:52 +0200 | |
---|---|---|
committer | 2015-04-19 12:08:52 +0200 | |
commit | 71c4d9f30460914a6823880e88e446799ecfe30f (patch) | |
tree | 4718c76a34a5aa2c160c381ab13cf1fa5cca99d7 /src/lib/util/options.h | |
parent | 337342a4c650f38d286a3347b670fbc7ee2c343f (diff) |
removed bool conversion and implicit empty check (nw)
Diffstat (limited to 'src/lib/util/options.h')
-rw-r--r-- | src/lib/util/options.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/util/options.h b/src/lib/util/options.h index 1b9528ff433..dafd2214dab 100644 --- a/src/lib/util/options.h +++ b/src/lib/util/options.h @@ -75,7 +75,7 @@ public: public: // getters entry *next() const { return m_next; } - const char *name(int index = 0) const { return (index < ARRAY_LENGTH(m_name) && m_name[index]) ? m_name[index].c_str() : NULL; } + const char *name(int index = 0) const { return (index < ARRAY_LENGTH(m_name) && !m_name[index].empty()) ? m_name[index].c_str() : NULL; } const char *description() const { return m_description; } const char *value() const { return m_data.c_str(); } const char *default_value() const { return m_defdata.c_str(); } @@ -87,7 +87,7 @@ public: bool is_header() const { return type() == OPTION_HEADER; } bool is_command() const { return type() == OPTION_COMMAND; } bool is_internal() const { return m_flags & OPTION_FLAG_INTERNAL; } - bool has_range() const { return (m_minimum && m_maximum); } + bool has_range() const { return (!m_minimum.empty() && !m_maximum.empty()); } int priority() const { return m_priority; } // setters |