summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/util/options.c
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2015-04-19 12:08:52 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2015-04-19 12:08:52 +0200
commit71c4d9f30460914a6823880e88e446799ecfe30f (patch)
tree4718c76a34a5aa2c160c381ab13cf1fa5cca99d7 /src/lib/util/options.c
parent337342a4c650f38d286a3347b670fbc7ee2c343f (diff)
removed bool conversion and implicit empty check (nw)
Diffstat (limited to 'src/lib/util/options.c')
-rw-r--r--src/lib/util/options.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/util/options.c b/src/lib/util/options.c
index f5beddf1d71..3ba8956eb3f 100644
--- a/src/lib/util/options.c
+++ b/src/lib/util/options.c
@@ -362,7 +362,7 @@ bool core_options::parse_command_line(int argc, char **argv, int priority, astri
if (curentry->type() == OPTION_COMMAND)
{
// can only have one command
- if (m_command)
+ if (!m_command.empty())
{
error_string.catprintf("Error: multiple commands specified -%s and %s\n", m_command.c_str(), curarg);
return false;
@@ -701,7 +701,7 @@ void core_options::remove_entry(core_options::entry &delentry)
{
// remove all names from the map
for (int name = 0; name < ARRAY_LENGTH(delentry.m_name); name++)
- if (delentry.m_name[name])
+ if (!delentry.m_name[name].empty())
m_entrymap.remove(delentry.m_name[name].c_str());
// remove the entry from the list