Use auto to avoid repeating type of dynamic cast

I think the clang-tidy lint is called modernize-use-auto
This commit is contained in:
Johannes Altmanninger 2022-07-31 21:34:13 +02:00
parent 00490cd084
commit 6563b82092

View File

@ -1705,7 +1705,7 @@ void InputHandler::prompt(StringView prompt, String initstr, String emptystr,
void InputHandler::set_prompt_face(Face prompt_face)
{
InputModes::Prompt* prompt = dynamic_cast<InputModes::Prompt*>(&current_mode());
auto* prompt = dynamic_cast<InputModes::Prompt*>(&current_mode());
if (prompt)
prompt->set_prompt_face(prompt_face);
}