Skip to content

Commit 1a8e372

Browse files
committed
fix typo and remove unnecessary conditional
1 parent 02159d9 commit 1a8e372

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

components/core/src/clp_s/CommandLineArguments.cpp

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -262,22 +262,20 @@ CommandLineArguments::parse_arguments(int argc, char const** argv) {
262262
throw std::invalid_argument("No input paths specified.");
263263
}
264264

265-
if (parsed_command_line_options.count("file-type") > 0) {
266-
if (cJsonFileType == file_type) {
267-
m_file_type = FileType::Json;
268-
} else if (cKeyValueIrFileType == file_type) {
269-
m_file_type = FileType::KeyValueIr;
270-
if (m_structurize_arrays) {
271-
SPDLOG_ERROR(
272-
"Invalid combination of arguments; --file-type {} and "
273-
"--structurize-arrays can't be used together",
274-
cKeyValueIrFileType
275-
);
276-
return ParsingResult::Failure;
277-
}
278-
} else {
279-
throw std::invalid_argument("Unknown FILE_TYPE: " + file_type);
265+
if (cJsonFileType == file_type) {
266+
m_file_type = FileType::Json;
267+
} else if (cKeyValueIrFileType == file_type) {
268+
m_file_type = FileType::KeyValueIr;
269+
if (m_structurize_arrays) {
270+
SPDLOG_ERROR(
271+
"Invalid combination of arguments; --file-type {} and "
272+
"--structurize-arrays can't be used together",
273+
cKeyValueIrFileType
274+
);
275+
return ParsingResult::Failure;
280276
}
277+
} else {
278+
throw std::invalid_argument("Unknown FILE_TYPE: " + file_type);
281279
}
282280

283281
// Parse and validate global metadata DB config

components/core/src/clp_s/clp-s.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ bool compress(CommandLineArguments const& command_line_arguments) {
118118
// Functionality Coming in later PR
119119
// -->Call new parsing function in Json Parser to parse IRv2 to archive
120120
// -->Check for error from parsing function
121-
SPDLOG_ERROR("Compressing Key Valur IR Files is not yet supported");
121+
SPDLOG_ERROR("Compressing Key Value IR Files is not yet supported");
122122
return false;
123123
} else {
124124
if (false == parser.parse()) {

0 commit comments

Comments
 (0)