[ion/simulator] Ignore empty cli arguments

This commit is contained in:
Romain Goyet
2020-09-11 16:38:42 -04:00
committed by Léa Saviot
parent 3740e0f135
commit f37008d8d7

View File

@@ -24,8 +24,10 @@ public:
const char * pop(const char * key);
bool popFlag(const char * flag);
void push(const char * key, const char * value) {
m_arguments.push_back(key);
m_arguments.push_back(value);
if (key != nullptr && value != nullptr) {
m_arguments.push_back(key);
m_arguments.push_back(value);
}
}
void push(const char * argument) { m_arguments.push_back(argument); }
int argc() const { return m_arguments.size(); }