src/CLIParser.h
branchv_0
changeset 14 82bd0f57a889
parent 13 c9fece435aa2
child 15 051e58022783
--- a/src/CLIParser.h	Tue Feb 05 12:14:58 2019 +0100
+++ b/src/CLIParser.h	Tue Feb 05 12:41:54 2019 +0100
@@ -46,12 +46,6 @@
 		}
 	}
 
-	bool parseBoolean(const string_t& value, const string_t& optionName) {
-		if (value == L"true") return true;
-		else if (value == L"false") return false;
-		else throw relpipe::cli::RelpipeCLIException(L"Unable to parse boolean value of option: " + optionName + L" (expecting true or false)", relpipe::cli::CLI::EXIT_CODE_BAD_CLI_ARGUMENTS);
-	}
-
 	relpipe::writer::TypeId parseTypeId(const string_t& value) {
 		using t = relpipe::writer::TypeId;
 		if (value == L"string") return t::STRING;
@@ -83,7 +77,7 @@
 				else if (option == OPTION_AFTER_RECORDS) currentRelation.guileAfterRecords = readNext(arguments, i);
 				else if (option == OPTION_FOR_EACH) currentRelation.guileForEach = readNext(arguments, i);
 				else if (option == OPTION_WHERE) currentRelation.guileWhere = readNext(arguments, i);
-				else if (option == OPTION_DROP) currentRelation.drop = parseBoolean(readNext(arguments, i), option);
+				else if (option == OPTION_DROP) currentRelation.drop = true;
 				else if (option == OPTION_RELATION) {
 					addRelation(c, currentRelation); // previous relation
 					currentRelation.relation = readNext(arguments, i);