Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: kirkrodrigues <[email protected]>
  • Loading branch information
davemarco and kirkrodrigues authored Dec 13, 2024
1 parent 1da4c7d commit f08e07f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/clp_ffi_js/ir/StructuredIrUnitHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,13 @@ auto StructuredIrUnitHandler::get_log_level(
if (false == log_level_optional_value.has_value()) {
return log_level;
}

auto const log_level_value = log_level_optional_value.value();

if (log_level_value.is<std::string>()) {
auto const& log_level_str = log_level_value.get_immutable_view<std::string>();
log_level = parse_log_level(log_level_str);
} else if (log_level_value.is<clp::ffi::value_int_t>()) {
auto const& log_level_int = (log_level_value.get_immutable_view<clp::ffi::value_int_t>());
auto const& log_level_int = log_level_value.get_immutable_view<clp::ffi::value_int_t>();
if (log_level_int >= clp::enum_to_underlying_type(cValidLogLevelsBeginIdx)
&& log_level_int < clp::enum_to_underlying_type(LogLevel::LENGTH))
{
Expand Down

0 comments on commit f08e07f

Please sign in to comment.