1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:37:35 +00:00

Assistant: Use static_cast instead of dynamic_cast

When the type is guaranteed to be known, there's no need to use RTTI.
This commit is contained in:
Andreas Kling 2021-06-30 11:44:52 +02:00
parent 6c630437e9
commit 80cf8bb27c

View file

@ -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<Assistant::ResultRow&>(results_container.child_widgets()[i]);
auto& row = static_cast<Assistant::ResultRow&>(results_container.child_widgets()[i]);
row.set_is_highlighted(i == app_state.selected_index);
}
};