Skip to content

Commit

Permalink
Use more std::unreachable().
Browse files Browse the repository at this point in the history
  • Loading branch information
wilx committed Dec 8, 2024
1 parent f16c0a0 commit fe2579a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/env.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ get_env_var (tstring & value, tstring const & name)
helpers::getLogLog().error(
LOG4CPLUS_TEXT ("_dupenv_s failed. Error: ")
+ helpers::convertIntegerToString (eno), true);
std::unreachable ();
}

return !! buf;
Expand Down
2 changes: 2 additions & 0 deletions src/hierarchy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ Hierarchy::getInstanceImpl(const tstring_view& name,
helpers::getLogLog().error(
LOG4CPLUS_TEXT("Hierarchy::getInstanceImpl()- Insert failed"),
true);
std::unreachable ();
}

if (auto pnm_it = provisionNodes.find(name); pnm_it != provisionNodes.end())
Expand Down Expand Up @@ -352,6 +353,7 @@ Hierarchy::updateParents(Logger const & logger)
helpers::getLogLog().error(
LOG4CPLUS_TEXT("Hierarchy::updateParents()- Insert failed"),
true);
std::unreachable ();
}
}
} // end if Logger found
Expand Down

0 comments on commit fe2579a

Please sign in to comment.