From 80cf8bb27c8b628800cef7391db74f6359f52abf Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 30 Jun 2021 11:44:52 +0200 Subject: [PATCH] Assistant: Use static_cast instead of dynamic_cast When the type is guaranteed to be known, there's no need to use RTTI. --- Userland/Applications/Assistant/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Applications/Assistant/main.cpp b/Userland/Applications/Assistant/main.cpp index 8b25e94c35..1e18ac40ed 100644 --- a/Userland/Applications/Assistant/main.cpp +++ b/Userland/Applications/Assistant/main.cpp @@ -206,7 +206,7 @@ int main(int argc, char** argv) auto mark_selected_item = [&]() { for (size_t i = 0; i < app_state.visible_result_count; ++i) { - auto& row = dynamic_cast(results_container.child_widgets()[i]); + auto& row = static_cast(results_container.child_widgets()[i]); row.set_is_highlighted(i == app_state.selected_index); } };