Skip to content

Commit

Permalink
Add noexcept to handler_for_key.
Browse files Browse the repository at this point in the history
  • Loading branch information
travisdowns committed Jul 14, 2022
1 parent 6cb5a71 commit f649f7f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/v/kafka/server/handlers/handler_interface.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ constexpr auto make_lut(type_list<Ts...>) {
return lut;
}

std::optional<handler> handler_for_key(kafka::api_key key) {
std::optional<handler> handler_for_key(kafka::api_key key) noexcept {
static constexpr auto lut = make_lut(request_types{});
if (key >= (short)0 && key < (short)lut.size()) {
if (auto handler = lut[key]) {
Expand Down
2 changes: 1 addition & 1 deletion src/v/kafka/server/handlers/handler_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,6 @@ using handler = const handler_interface*;
* @param key the API key for the handler
* @return std::optional<handler> the handler, if any
*/
std::optional<handler> handler_for_key(api_key key);
std::optional<handler> handler_for_key(api_key key) noexcept;

} // namespace kafka

0 comments on commit f649f7f

Please sign in to comment.